protected function PatternSettingTypeBase::handleInput in UI Patterns Settings 8.2
Add validation and basics classes to the raw input field.
Parameters
array $input: The input field.
\Drupal\ui_patterns_settings\Definition\PatternDefinitionSetting $def: The pattern definition.
string $form_type: The form type. Either layouts_display or display.
9 calls to PatternSettingTypeBase::handleInput()
- AttributesSettingType::settingsForm in src/
Plugin/ UiPatterns/ SettingType/ AttributesSettingType.php - Returns the configuration form elements specific to this settings plugin..
- BooleanSettingType::settingsForm in src/
Plugin/ UiPatterns/ SettingType/ BooleanSettingType.php - Returns the configuration form elements specific to this settings plugin..
- CheckboxesSettingType::settingsForm in src/
Plugin/ UiPatterns/ SettingType/ CheckboxesSettingType.php - Returns the configuration form elements specific to this settings plugin..
- ColorWidgetSettingType::handleInput in src/
Plugin/ UiPatterns/ SettingType/ ColorWidgetSettingType.php - Add validation and basics classes to the raw input field.
- EnumerationSettingTypeBase::settingsForm in src/
Plugin/ EnumerationSettingTypeBase.php - Returns the configuration form elements specific to this settings plugin..
1 method overrides PatternSettingTypeBase::handleInput()
- ColorWidgetSettingType::handleInput in src/
Plugin/ UiPatterns/ SettingType/ ColorWidgetSettingType.php - Add validation and basics classes to the raw input field.
File
- src/
Plugin/ PatternSettingTypeBase.php, line 297
Class
- PatternSettingTypeBase
- Base class for UI Patterns Setting plugins.
Namespace
Drupal\ui_patterns_settings\PluginCode
protected function handleInput(array &$input, PatternDefinitionSetting $def, $form_type) {
$input['#attributes']['class'][] = 'js-ui-patterns-settings__input';
$input['#wrapper_attributes']['class'][] = 'js-ui-patterns-settings__input-wrapper';
if ($def
->getRequired()) {
$input['#title'] .= ' *';
if ($form_type === 'layouts_display') {
$input['#element_validate'][] = [
PatternSettingTypeBase::class,
'validateLayout',
];
}
}
}