You are here

protected function WebformComputedBase::getMode in Webform 6.x

Same name in this branch
  1. 6.x src/Element/WebformComputedBase.php \Drupal\webform\Element\WebformComputedBase::getMode()
  2. 6.x src/Plugin/WebformElement/WebformComputedBase.php \Drupal\webform\Plugin\WebformElement\WebformComputedBase::getMode()
Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/WebformComputedBase.php \Drupal\webform\Plugin\WebformElement\WebformComputedBase::getMode()

Get computed element markup.

Parameters

array $element: An element.

Return value

string The type of markup, HTML or plain-text.

2 calls to WebformComputedBase::getMode()
WebformComputedBase::formatHtmlItem in src/Plugin/WebformElement/WebformComputedBase.php
Format an element's value as HTML.
WebformComputedBase::formatTextItem in src/Plugin/WebformElement/WebformComputedBase.php
Format an element's value as text.

File

src/Plugin/WebformElement/WebformComputedBase.php, line 305

Class

WebformComputedBase
Provides a base class for 'webform_computed' elements.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function getMode(array $element) {
  $class = $this
    ->getFormElementClassDefinition();
  return $class::getMode($element);
}