You are here

protected function WebformTableRow::build in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/WebformTableRow.php \Drupal\webform\Plugin\WebformElement\WebformTableRow::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

src/Plugin/WebformElement/WebformTableRow.php, line 73

Class

WebformTableRow
Provides a 'webform_table_row' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

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