You are here

protected function FlexiformEntityFormDisplay::getProvidedEntities in Flexiform 8

Get the array of provided entities.

2 calls to FlexiformEntityFormDisplay::getProvidedEntities()
FlexiformEntityFormDisplay::buildForm in src/FlexiformEntityFormDisplay.php
Adds field widgets to an entity form.
FlexiformEntityFormDisplay::extractFormValues in src/FlexiformEntityFormDisplay.php
Extracts field values from the submitted widget values into the entity.

File

src/FlexiformEntityFormDisplay.php, line 255

Class

FlexiformEntityFormDisplay
Defines a class to extend EntityFormDisplays.

Namespace

Drupal\flexiform

Code

protected function getProvidedEntities(FormStateInterface $form_state, FieldableEntityInterface $base_entity = NULL) {
  $provided = [];
  if ($base_entity) {
    $provided[$this->baseEntityNamespace] = $base_entity;
  }
  $provided += $form_state
    ->get('form_entity_provided') ?: [];
  return $provided;
}