public function WebformMarkup::buildText in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/WebformMarkup.php \Drupal\webform\Plugin\WebformElement\WebformMarkup::buildText()
Build an element as text element.
Parameters
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.
Overrides WebformMarkupBase::buildText
File
- src/
Plugin/ WebformElement/ WebformMarkup.php, line 39
Class
- WebformMarkup
- Provides a 'webform_markup' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function buildText(array $element, WebformSubmissionInterface $webform_submission, array $options = []) {
if (isset($element['#markup'])) {
$element['#markup'] = MailFormatHelper::htmlToText($element['#markup']);
}
return parent::buildText($element, $webform_submission, $options);
}