public function NameFieldTest::nameGetFieldStorageSettings in Name Field 8
Helper function to get the field storage settings.
Return value
array The settings.
1 call to NameFieldTest::nameGetFieldStorageSettings()
- NameFieldTest::testFieldEntry in tests/
src/ Functional/ NameFieldTest.php - The most basic test.
File
- tests/
src/ Functional/ NameFieldTest.php, line 330
Class
- NameFieldTest
- Various tests on creating a name field on a node.
Namespace
Drupal\Tests\name\FunctionalCode
public function nameGetFieldStorageSettings() {
return [
'settings[components][title]' => TRUE,
'settings[components][given]' => TRUE,
'settings[components][middle]' => TRUE,
'settings[components][family]' => TRUE,
'settings[components][generational]' => TRUE,
'settings[components][credentials]' => TRUE,
'settings[minimum_components][title]' => FALSE,
'settings[minimum_components][given]' => TRUE,
'settings[minimum_components][middle]' => FALSE,
'settings[minimum_components][family]' => TRUE,
'settings[minimum_components][generational]' => FALSE,
'settings[minimum_components][credentials]' => FALSE,
'settings[max_length][title]' => 31,
'settings[max_length][given]' => 63,
'settings[max_length][middle]' => 127,
'settings[max_length][family]' => 63,
'settings[max_length][generational]' => 15,
'settings[max_length][credentials]' => 255,
'settings[labels][title]' => t('Title'),
'settings[labels][given]' => t('Given'),
'settings[labels][middle]' => t('Middle name(s)'),
'settings[labels][family]' => t('Family'),
'settings[labels][generational]' => t('Generational'),
'settings[labels][credentials]' => t('Credentials'),
'settings[sort_options][title]' => TRUE,
'settings[sort_options][generational]' => FALSE,
'settings[title_options]' => "-- --\nMr.\nMrs.\nMiss\nMs.\nDr.\nProf.",
'settings[generational_options]' => "-- --\nJr.\nSr.\nI\nII\nIII\nIV\nV\nVI\nVII\nVIII\nIX\nX",
];
}