You are here

public function NameFormatter::getLastDelimitorTypes in Name Field 8

Defines the supported final delimitor options.

Parameters

bool $include_examples: Flag to include examples in the options.

Return value

array Keyed options that are supported.

Overrides NameFormatterInterface::getLastDelimitorTypes

File

src/NameFormatter.php, line 251

Class

NameFormatter
Primary name formatter for an array of name components.

Namespace

Drupal\name

Code

public function getLastDelimitorTypes($include_examples = TRUE) {
  if ($include_examples) {
    return [
      'text' => $this
        ->t('Textual (and)'),
      'symbol' => $this
        ->t('Ampersand (&)'),
      'inherit' => $this
        ->t('Inherit delimiter'),
    ];
  }
  else {
    return [
      'text' => $this
        ->t('Textual'),
      'symbol' => $this
        ->t('Ampersand'),
      'inherit' => $this
        ->t('Inherit delimiter'),
    ];
  }
}