config_translation_config_schema_info_alter(&$definitions)
Implements hook_config_schema_info_alter().
File
- core/modules/config_translation/config_translation.module, line 179
- Configuration Translation module.
Code
function config_translation_config_schema_info_alter(&$definitions) { $map = array( 'label' => '\Drupal\config_translation\FormElement\Textfield', 'text' => '\Drupal\config_translation\FormElement\Textarea', 'date_format' => '\Drupal\config_translation\FormElement\DateFormat', 'text_format' => '\Drupal\config_translation\FormElement\TextFormat', 'mapping' => '\Drupal\config_translation\FormElement\ListElement', 'sequence' => '\Drupal\config_translation\FormElement\ListElement', 'plural_label' => '\Drupal\config_translation\FormElement\PluralVariants', ); // Enhance the text and date type definitions with classes to generate proper // form elements in ConfigTranslationFormBase. Other translatable types will // appear as a one line textfield. foreach ($definitions as $type => &$definition) { if (isset($map[$type]) && !isset($definition['form_element_class'])) { $definition['form_element_class'] = $map[$type]; } } }
Please login to continue.