protected function WidgetBase::selectEntities in Entity Browser 8.2
Same name and namespace in other branches
- 8 src/WidgetBase.php \Drupal\entity_browser\WidgetBase::selectEntities()
Dispatches event that informs all subscribers about new selected entities.
Parameters
array $entities: Array of entities.
6 calls to WidgetBase::selectEntities()
- DummyWidget::submit in tests/
modules/ entity_browser_test/ src/ Plugin/ EntityBrowser/ Widget/ DummyWidget.php - Submits form.
- EntityForm::submit in modules/
entity_form/ src/ Plugin/ EntityBrowser/ Widget/ EntityForm.php - Submits form.
- MediaImageUpload::submit in src/
Plugin/ EntityBrowser/ Widget/ MediaImageUpload.php - Submits form.
- MultipleSubmitTestWidget::submit in tests/
modules/ entity_browser_test/ src/ Plugin/ EntityBrowser/ Widget/ MultipleSubmitTestWidget.php - Submits form.
- Upload::submit in src/
Plugin/ EntityBrowser/ Widget/ Upload.php - Submits form.
File
- src/
WidgetBase.php, line 338
Class
- WidgetBase
- Base class for widget plugins.
Namespace
Drupal\entity_browserCode
protected function selectEntities(array $entities, FormStateInterface $form_state) {
$selected_entities =& $form_state
->get([
'entity_browser',
'selected_entities',
]);
$selected_entities = array_merge($selected_entities, $entities);
$this->eventDispatcher
->dispatch(Events::SELECTED, new EntitySelectionEvent($this->configuration['entity_browser_id'], $form_state
->get([
'entity_browser',
'instance_uuid',
]), $entities));
}