You are here

public function ModerationStateFieldItemList::__construct in Config Entity Revisions 8.2

Constructs a TypedData object given its definition and context.

Parameters

\Drupal\Core\TypedData\DataDefinitionInterface $definition: The data definition.

string $name: (optional) The name of the created property, or NULL if it is the root of a typed data tree. Defaults to NULL.

\Drupal\Core\TypedData\TypedDataInterface $parent: (optional) The parent object of the data property, or NULL if it is the root of a typed data tree. Defaults to NULL.

Overrides TypedData::__construct

See also

\Drupal\Core\TypedData\TypedDataManager::create()

File

src/ModerationStateFieldItemList.php, line 38

Class

ModerationStateFieldItemList
A computed field that provides a content entity's moderation state.

Namespace

Drupal\content_moderation\Plugin\Field

Code

public function __construct(DataDefinitionInterface $definition, $name = NULL, TypedDataInterface $parent = NULL) {
  $this->definition = $definition;
  $this->parent = $parent;
  $this->name = $name;
}