protected static function NameFormDisplaySettingsTrait::getDefaultNameFormDisplaySettings in Name Field 8
Gets the default settings for controlling a name element.
Return value
array Default settings.
2 calls to NameFormDisplaySettingsTrait::getDefaultNameFormDisplaySettings()
- NameItem::defaultFieldSettings in src/
Plugin/ Field/ FieldType/ NameItem.php - Defines the field-level settings for this plugin.
- NameWidget::defaultSettings in src/
Plugin/ Field/ FieldWidget/ NameWidget.php - Defines the default settings for this plugin.
File
- src/
Traits/ NameFormDisplaySettingsTrait.php, line 20
Class
- NameFormDisplaySettingsTrait
- Name form display settings trait.
Namespace
Drupal\name\TraitsCode
protected static function getDefaultNameFormDisplaySettings() {
return [
'labels' => [
'title' => t('Title'),
'given' => t('Given'),
'middle' => t('Middle name(s)'),
'family' => t('Family'),
'generational' => t('Generational'),
'credentials' => t('Credentials'),
],
'size' => [
'title' => 6,
'given' => 20,
'middle' => 20,
'family' => 20,
'generational' => 5,
'credentials' => 35,
],
'title_display' => [
'title' => 'description',
'given' => 'description',
'middle' => 'description',
'family' => 'description',
'generational' => 'description',
'credentials' => 'description',
],
'widget_layout' => 'stacked',
'show_component_required_marker' => FALSE,
'credentials_inline' => FALSE,
];
}