function EntityReferenceItem::fieldSettingsAjaxProcessElement
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::fieldSettingsAjaxProcessElement()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::fieldSettingsAjaxProcessElement()
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::fieldSettingsAjaxProcessElement()
Adds the field settings to AJAX form elements.
See also
static::fieldSettingsAjaxProcess()
1 call to EntityReferenceItem::fieldSettingsAjaxProcessElement()
- EntityReferenceItem::fieldSettingsAjaxProcess in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ EntityReferenceItem.php - Render API callback: Processes the field settings form.
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ EntityReferenceItem.php, line 709
Class
- EntityReferenceItem
- Defines the 'entity_reference' entity field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public static function fieldSettingsAjaxProcessElement(&$element, $main_form) {
// Elements are marked as TRUE ('#ajax' => TRUE,), so not empty.
if (!empty($element['#ajax'])) {
$element['#ajax'] = [
'trigger_as' => [
'name' => 'handler_settings_submit',
],
'wrapper' => 'field-combined',
'element' => $main_form['#array_parents'],
];
}
foreach (Element::children($element) as $key) {
static::fieldSettingsAjaxProcessElement($element[$key], $main_form);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.