You are here

public function EntityFormProxy::submit in Lightning Media 8.4

Same name and namespace in other branches
  1. 8 src/Plugin/EntityBrowser/Widget/EntityFormProxy.php \Drupal\lightning_media\Plugin\EntityBrowser\Widget\EntityFormProxy::submit()
  2. 8.2 src/Plugin/EntityBrowser/Widget/EntityFormProxy.php \Drupal\lightning_media\Plugin\EntityBrowser\Widget\EntityFormProxy::submit()
  3. 8.3 src/Plugin/EntityBrowser/Widget/EntityFormProxy.php \Drupal\lightning_media\Plugin\EntityBrowser\Widget\EntityFormProxy::submit()
1 method overrides EntityFormProxy::submit()
FileUpload::submit in src/Plugin/EntityBrowser/Widget/FileUpload.php

File

src/Plugin/EntityBrowser/Widget/EntityFormProxy.php, line 171

Class

EntityFormProxy
Base class for EB widgets which wrap around an (inline) entity form.

Namespace

Drupal\lightning_media\Plugin\EntityBrowser\Widget

Code

public function submit(array &$element, array &$form, FormStateInterface $form_state) {

  // IEF will take care of creating the entity upon submission. All we need to
  // do is send it upstream to Entity Browser.
  $entity = $form['widget']['entity']['#entity'];
  $this
    ->selectEntities([
    $entity,
  ], $form_state);
}