Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Drupal\name\Service; |
| 6 | |
| 7 | use Drupal\Core\Field\FieldDefinitionInterface; |
| 8 | |
| 9 | /** |
| 10 | * Options lists for name field components (titles, generational suffixes). |
| 11 | */ |
| 12 | interface NameOptionInterface { |
| 13 | |
| 14 | /** |
| 15 | * Regular expression for finding the vocabulary token in option strings. |
| 16 | */ |
| 17 | public const VOCABULARY_REGEX = '/^\[vocabulary:([0-9a-z\_]{1,})\]/'; |
| 18 | |
| 19 | /** |
| 20 | * Options for a name component. |
| 21 | * |
| 22 | * @return array<string, string> |
| 23 | * Options keyed by value. |
| 24 | */ |
| 25 | public function getOptions(FieldDefinitionInterface $field, string $component): array; |
| 26 | |
| 27 | } |