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
3declare(strict_types=1);
4
5namespace Drupal\name\Service;
6
7use Drupal\Core\Field\FieldDefinitionInterface;
8
9/**
10 * Options lists for name field components (titles, generational suffixes).
11 */
12interface 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}