You are here

public function WebformEntityOptionsTrait::prepare in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformElement/WebformEntityOptionsTrait.php \Drupal\webform\Plugin\WebformElement\WebformEntityOptionsTrait::prepare()

File

src/Plugin/WebformElement/WebformEntityOptionsTrait.php, line 53

Class

WebformEntityOptionsTrait
Provides an 'entity_reference' with options trait.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function prepare(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
  $this
    ->setOptions($element, [
    'webform_submission' => $webform_submission,
  ]);
  parent::prepare($element, $webform_submission);
}