You are here

public function YamlFormElementBase::formatHtml in YAML Form 8

Format an element's value as HTML.

Parameters

array $element: An element.

array|mixed $value: A value.

array $options: An array of options.

Return value

array|string The element's value formatted as an HTML string or a render array.

Overrides YamlFormElementInterface::formatHtml

9 calls to YamlFormElementBase::formatHtml()
Color::formatHtml in src/Plugin/YamlFormElement/Color.php
Format an element's value as HTML.
Email::formatHtml in src/Plugin/YamlFormElement/Email.php
Format an element's value as HTML.
OptionsBase::formatHtml in src/Plugin/YamlFormElement/OptionsBase.php
Format an element's value as HTML.
Telephone::formatHtml in src/Plugin/YamlFormElement/Telephone.php
Format an element's value as HTML.
Url::formatHtml in src/Plugin/YamlFormElement/Url.php
Format an element's value as HTML.

... See full list

15 methods override YamlFormElementBase::formatHtml()
Color::formatHtml in src/Plugin/YamlFormElement/Color.php
Format an element's value as HTML.
Email::formatHtml in src/Plugin/YamlFormElement/Email.php
Format an element's value as HTML.
OptionsBase::formatHtml in src/Plugin/YamlFormElement/OptionsBase.php
Format an element's value as HTML.
Table::formatHtml in src/Plugin/YamlFormElement/Table.php
Format an element's value as HTML.
Telephone::formatHtml in src/Plugin/YamlFormElement/Telephone.php
Format an element's value as HTML.

... See full list

File

src/YamlFormElementBase.php, line 612

Class

YamlFormElementBase
Provides a base class for a form element.

Namespace

Drupal\yamlform

Code

public function formatHtml(array &$element, $value, array $options = []) {
  return $this
    ->formatText($element, $value, $options);
}