public function TextProcessed::__construct

Implements TypedDataInterface::__construct().

Overrides TypedData::__construct

File

drupal/core/modules/field/modules/text/lib/Drupal/text/TextProcessed.php, line 54
Definition of Drupal\text\TextProcessed.

Class

TextProcessed
A computed property for processing text with a format.

Namespace

Drupal\text

Code

public function __construct(array $definition) {
  $this->definition = $definition;
  if (!isset($definition['settings']['text source'])) {
    throw new InvalidArgumentException("The definition's 'source' key has to specify the name of the text property to be processed.");
  }
}