public static function EntityReferenceItem::fieldSettingsAjaxProcessElement in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::fieldSettingsAjaxProcessElement()
Adds entity_reference specific properties to AJAX form elements from the field settings form.
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 and allows access to the form state.
File
- core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ EntityReferenceItem.php, line 568 - Contains \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem.
Class
- EntityReferenceItem
- Defines the 'entity_reference' entity field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public static function fieldSettingsAjaxProcessElement(&$element, $main_form) {
if (!empty($element['#ajax'])) {
$element['#ajax'] = array(
'callback' => array(
get_called_class(),
'settingsAjax',
),
'wrapper' => $main_form['#id'],
'element' => $main_form['#array_parents'],
);
}
foreach (Element::children($element) as $key) {
static::fieldSettingsAjaxProcessElement($element[$key], $main_form);
}
}