public static function EntityReferenceBrowserWidget::processEntityBrowser 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::processEntityBrowser()
Render API callback: Processes the entity browser element.
File
- src/
Plugin/ Field/ FieldWidget/ EntityReferenceBrowserWidget.php, line 461
Class
- EntityReferenceBrowserWidget
- Plugin implementation of the 'entity_reference' widget for entity browser.
Namespace
Drupal\entity_browser\Plugin\Field\FieldWidgetCode
public static function processEntityBrowser(&$element, FormStateInterface $form_state, &$complete_form) {
$uuid = key($element['#attached']['drupalSettings']['entity_browser']);
$element['#attached']['drupalSettings']['entity_browser'][$uuid]['selector'] = '#' . $element['#custom_hidden_id'];
return $element;
}