You are here

protected function EntityFormProxy::prepareEntities in Lightning Media 8

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

File

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

Class

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

Namespace

Drupal\lightning_media\Plugin\EntityBrowser\Widget

Code

protected function prepareEntities(array $form, FormStateInterface $form_state) {
  if (isset($form['widget']['entity']['#entity'])) {
    return [
      $form['widget']['entity']['#entity'],
    ];
  }
  else {
    return [];
  }
}