public function YamlFormTest::formatText in YAML Form 8
Format an element's value as plain text.
Parameters
array $element: An element.
array|mixed $value: A value.
array $options: An array of options.
Return value
string The element's value formatted as plain text or a render array.
Overrides YamlFormElementBase::formatText
1 call to YamlFormTest::formatText()
- YamlFormTest::formatHtml in tests/
modules/ yamlform_test/ src/ Plugin/ YamlFormElement/ YamlFormTest.php - Format an element's value as HTML.
File
- tests/
modules/ yamlform_test/ src/ Plugin/ YamlFormElement/ YamlFormTest.php, line 46
Class
- YamlFormTest
- Provides a 'yamlform_test' element.
Namespace
Drupal\yamlform_test\Plugin\YamlFormElementCode
public function formatText(array &$element, $value, array $options = []) {
$this
->displayMessage(__FUNCTION__);
return strtoupper($value);
}