You are here

protected function WebformCompositeBase::formatCompositeHtml in Webform 6.x

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

Format a composite's sub element's value as HTML.

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 an HTML string or a render array.

3 calls to WebformCompositeBase::formatCompositeHtml()
WebformCompositeBase::formatCompositeHtmlItems in src/Plugin/WebformElement/WebformCompositeBase.php
Format a composite as a list of HTML items.
WebformCompositeBase::formatHtml in src/Plugin/WebformElement/WebformCompositeBase.php
Format an element's value as HTML.
WebformCompositeBase::formatHtmlItems in src/Plugin/WebformElement/WebformCompositeBase.php
Format an element's items as HTML.

File

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

Class

WebformCompositeBase
Provides a base for composite elements.

Namespace

Drupal\webform\Plugin\WebformElement

Code

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