You are here

protected function WebformCompositeBase::formatTextItems in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/WebformCompositeBase.php \Drupal\webform\Plugin\WebformElement\WebformCompositeBase::formatTextItems()

Format an element's items as text.

Parameters

array $element: An element.

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

array $options: An array of options.

Return value

string The element's items as text.

Overrides WebformElementBase::formatTextItems

File

src/Plugin/WebformElement/WebformCompositeBase.php, line 483

Class

WebformCompositeBase
Provides a base for composite elements.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function formatTextItems(array &$element, WebformSubmissionInterface $webform_submission, array $options = []) {
  $format = $this
    ->getItemsFormat($element);
  if ($format === 'table') {
    $element['#format_items'] = 'hr';
  }
  return parent::formatTextItems($element, $webform_submission, $options);
}