function TextProcessed::__construct
Same name in other branches
- 9 core/modules/text/src/TextProcessed.php \Drupal\text\TextProcessed::__construct()
- 10 core/modules/text/src/TextProcessed.php \Drupal\text\TextProcessed::__construct()
- 11.x core/modules/text/src/TextProcessed.php \Drupal\text\TextProcessed::__construct()
Overrides TypedData::__construct
File
-
core/
modules/ text/ src/ TextProcessed.php, line 30
Class
- TextProcessed
- A computed property for processing text with a format.
Namespace
Drupal\textCode
public function __construct(DataDefinitionInterface $definition, $name = NULL, TypedDataInterface $parent = NULL) {
parent::__construct($definition, $name, $parent);
if ($definition->getSetting('text source') === NULL) {
throw new \InvalidArgumentException("The definition's 'text source' key has to specify the name of the text property to be processed.");
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.