You are here

interface WebformComputedInterface in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Element/WebformComputedInterface.php \Drupal\webform\Element\WebformComputedInterface

Defines an interface for webform computed element.

Hierarchy

Expanded class hierarchy of WebformComputedInterface

All classes that implement WebformComputedInterface

File

src/Element/WebformComputedInterface.php, line 10

Namespace

Drupal\webform\Element
View source
interface WebformComputedInterface {

  /**
   * Denotes HTML.
   *
   * @var string
   */
  const MODE_HTML = 'html';

  /**
   * Denotes plain text.
   *
   * @var string
   */
  const MODE_TEXT = 'text';

  /**
   * Denotes markup whose content type should be detected.
   *
   * @var string
   */
  const MODE_AUTO = 'auto';

  /**
   * Compute value.
   *
   * @param array $element
   *   An element.
   * @param \Drupal\webform\WebformSubmissionInterface $webform_submission
   *   A webform submission.
   *
   * @return string
   *   The computed value.
   */
  public static function computeValue(array $element, WebformSubmissionInterface $webform_submission);

}

Members

Namesort descending Modifiers Type Description Overrides
WebformComputedInterface::computeValue public static function Compute value. 1
WebformComputedInterface::MODE_AUTO constant Denotes markup whose content type should be detected.
WebformComputedInterface::MODE_HTML constant Denotes HTML.
WebformComputedInterface::MODE_TEXT constant Denotes plain text.