You are here

protected function WebformCompositeBase::formatCompositeText in Webform 8.5

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

Format a composite's sub element's value as plain text.

Parameters

array $element: An element.

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

array $options: An array of options.

Return value

array|string A composite's sub element's value formatted as plain text or a render array.

2 calls to WebformCompositeBase::formatCompositeText()
WebformCompositeBase::formatCompositeTextItems in src/Plugin/WebformElement/WebformCompositeBase.php
Format a composite as a list of plain text items.
WebformCompositeBase::formatText in src/Plugin/WebformElement/WebformCompositeBase.php
Format an element's value as plain text.

File

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

Class

WebformCompositeBase
Provides a base for composite elements.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function formatCompositeText(array $element, WebformSubmissionInterface $webform_submission, array $options = []) {
  return $this
    ->formatComposite('Text', $element, $webform_submission, $options);
}