public static function EntityReferenceBrowserWidget::updateFieldWidgetDisplaySettings in Entity Browser 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldWidget/EntityReferenceBrowserWidget.php \Drupal\entity_browser\Plugin\Field\FieldWidget\EntityReferenceBrowserWidget::updateFieldWidgetDisplaySettings()
Ajax callback that updates field widget display settings fieldset.
File
- src/
Plugin/ Field/ FieldWidget/ EntityReferenceBrowserWidget.php, line 297
Class
- EntityReferenceBrowserWidget
- Plugin implementation of the 'entity_reference' widget for entity browser.
Namespace
Drupal\entity_browser\Plugin\Field\FieldWidgetCode
public static function updateFieldWidgetDisplaySettings(array $form, FormStateInterface $form_state) {
$array_parents = $form_state
->getTriggeringElement()['#array_parents'];
$up_two_levels = array_slice($array_parents, 0, count($array_parents) - 2);
$settings_path = array_merge($up_two_levels, [
'field_widget_display_settings',
]);
$settingsElement = NestedArray::getValue($form, $settings_path);
return $settingsElement;
}