function StarkTestThemeHooks::preprocessFieldMultipleValueForm
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/stark_test/src/Hook/StarkTestThemeHooks.php \Drupal\stark_test\Hook\StarkTestThemeHooks::preprocessFieldMultipleValueForm()
Implements hook_preprocess_field_multiple_value_form().
Attributes
#[Hook('preprocess_field_multiple_value_form')]
File
-
core/
modules/ system/ tests/ modules/ stark_test/ src/ Hook/ StarkTestThemeHooks.php, line 17
Class
- StarkTestThemeHooks
- Hook implementations for stark_test.
Namespace
Drupal\stark_test\HookCode
public function preprocessFieldMultipleValueForm(&$variables) : void {
// Set test multiple value form field to disabled.
if ($variables["element"]["#field_name"] === "field_multiple_value_form_field") {
$variables['element']['#disabled'] = TRUE;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.