You are here

protected function WebformOptionsCustom::build in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_options_custom/src/Plugin/WebformElement/WebformOptionsCustom.php \Drupal\webform_options_custom\Plugin\WebformElement\WebformOptionsCustom::build()

Build an element as text or HTML.

Parameters

string $format: Format of the element, text or html.

array $element: An element.

\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.

array $options: An array of options.

Return value

array A render array representing an element as text or HTML.

Overrides WebformElementBase::build

File

modules/webform_options_custom/src/Plugin/WebformElement/WebformOptionsCustom.php, line 112

Class

WebformOptionsCustom
Provides a custom options element.

Namespace

Drupal\webform_options_custom\Plugin\WebformElement

Code

protected function build($format, array &$element, WebformSubmissionInterface $webform_submission, array $options = []) {
  $this
    ->setOptions($element, [
    'webform_submission' => $webform_submission,
  ]);
  return parent::build($format, $element, $webform_submission, $options);
}