You are here

abstract protected function WidgetBase::prepareEntities in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/WidgetBase.php \Drupal\entity_browser\WidgetBase::prepareEntities()

Prepares the entities without saving them.

We need this method when we want to validate or perform other operations before submit.

Parameters

array $form: Complete form.

\Drupal\Core\Form\FormStateInterface $form_state: The form state object.

Return value

\Drupal\Core\Entity\EntityInterface[] Array of entities.

1 call to WidgetBase::prepareEntities()
WidgetBase::validate in src/WidgetBase.php
Validates form.
6 methods override WidgetBase::prepareEntities()
DummyWidget::prepareEntities in tests/modules/entity_browser_test/src/Plugin/EntityBrowser/Widget/DummyWidget.php
Prepares the entities without saving them.
EntityForm::prepareEntities in modules/entity_form/src/Plugin/EntityBrowser/Widget/EntityForm.php
Prepares the entities without saving them.
MultipleSubmitTestWidget::prepareEntities in tests/modules/entity_browser_test/src/Plugin/EntityBrowser/Widget/MultipleSubmitTestWidget.php
Prepares the entities without saving them.
PagerTestWidget::prepareEntities in tests/modules/entity_browser_test/src/Plugin/EntityBrowser/Widget/PagerTestWidget.php
Prepares the entities without saving them.
Upload::prepareEntities in src/Plugin/EntityBrowser/Widget/Upload.php
Prepares the entities without saving them.

... See full list

File

src/WidgetBase.php, line 286

Class

WidgetBase
Base class for widget plugins.

Namespace

Drupal\entity_browser

Code

protected abstract function prepareEntities(array $form, FormStateInterface $form_state);