protected static function NameFieldSettingsTrait::getDefaultNameFieldSettings in Name Field 8
Gets the default settings for controlling a name element.
Return value
array Default settings.
1 call to NameFieldSettingsTrait::getDefaultNameFieldSettings()
- NameItem::defaultFieldSettings in src/
Plugin/ Field/ FieldType/ NameItem.php - Defines the field-level settings for this plugin.
File
- src/
Traits/ NameFieldSettingsTrait.php, line 20
Class
- NameFieldSettingsTrait
- Name settings trait.
Namespace
Drupal\name\TraitsCode
protected static function getDefaultNameFieldSettings() {
return [
'components' => [
'title' => TRUE,
'given' => TRUE,
'middle' => TRUE,
'family' => TRUE,
'generational' => TRUE,
'credentials' => TRUE,
],
'minimum_components' => [
'title' => FALSE,
'given' => TRUE,
'middle' => FALSE,
'family' => TRUE,
'generational' => FALSE,
'credentials' => FALSE,
],
'allow_family_or_given' => FALSE,
'max_length' => [
'title' => 31,
'given' => 63,
'middle' => 127,
'family' => 63,
'generational' => 15,
'credentials' => 255,
],
'field_type' => [
'title' => 'select',
'given' => 'text',
'middle' => 'text',
'family' => 'text',
'generational' => 'select',
'credentials' => 'text',
],
'autocomplete_source' => [
'title' => [
'title',
],
'given' => [],
'middle' => [],
'family' => [],
'generational' => [
'generation',
],
'credentials' => [],
],
'autocomplete_separator' => [
'title' => ' ',
'given' => ' -',
'middle' => ' -',
'family' => ' -',
'generational' => ' ',
'credentials' => ', ',
],
'title_options' => [
t('-- --'),
t('Mr.'),
t('Mrs.'),
t('Miss'),
t('Ms.'),
t('Dr.'),
t('Prof.'),
],
'generational_options' => [
t('-- --'),
t('Jr.'),
t('Sr.'),
t('I'),
t('II'),
t('III'),
t('IV'),
t('V'),
t('VI'),
t('VII'),
t('VIII'),
t('IX'),
t('X'),
],
'sort_options' => [
'title' => FALSE,
'given' => FALSE,
'middle' => FALSE,
'family' => FALSE,
'generational' => FALSE,
'credentials' => FALSE,
],
'component_layout' => 'default',
];
}