/** * Overrides TypedData::__construct(). */ 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."); } }
/** * Constructs a new instance. * * @param \Drupal\Core\TypedData\DataDefinitionInterface $definition * The data definition. * @param string $name * The name of the created property. * @param \Drupal\plugin\Plugin\Field\FieldType\PluginCollectionItemInterface $parent * The parent object of the data property. */ public function __construct(DataDefinitionInterface $definition, $name, PluginCollectionItemInterface $parent) { parent::__construct($definition, $name, $parent); }