You are here

public static function LanguageItem::defaultStorageSettings in Custom Language field 8

Defines the storage-level settings for this plugin.

Return value

array A list of default settings, keyed by the setting name.

Overrides FieldItemBase::defaultStorageSettings

File

src/Plugin/Field/FieldType/LanguageItem.php, line 56

Class

LanguageItem
Plugin implementation of the 'language' field type.

Namespace

Drupal\languagefield\Plugin\Field\FieldType

Code

public static function defaultStorageSettings() {
  $defaultStorageSettings = [
    'maxlength' => CustomLanguageManager::LANGUAGEFIELD_LANGCODE_MAXLENGTH,
    'language_range' => [
      CustomLanguageManager::LANGUAGEFIELD_LANGUAGES_PREDEFINED => CustomLanguageManager::LANGUAGEFIELD_LANGUAGES_PREDEFINED,
    ],
    'included_languages' => [],
    'excluded_languages' => [],
    'groups' => '',
    // @see callback_allowed_values_function()
    'allowed_values_function' => 'languagefield_allowed_values',
  ] + parent::defaultStorageSettings();
  return $defaultStorageSettings;
}