You are here

public function ExecutionMetadataState::setDataDefinition in Rules 8.3

Sets a data definition in the execution metadata state.

Parameters

string $name: Variable name of the data definition.

\Drupal\Core\TypedData\DataDefinitionInterface $definition: The data definition that represents the variable.

Return value

$this

Overrides ExecutionMetadataStateInterface::setDataDefinition

1 call to ExecutionMetadataState::setDataDefinition()
ExecutionMetadataState::__construct in src/Context/ExecutionMetadataState.php
Constructs the object.

File

src/Context/ExecutionMetadataState.php, line 53

Class

ExecutionMetadataState
The state used during configuration time holding data definitions.

Namespace

Drupal\rules\Context

Code

public function setDataDefinition($name, DataDefinitionInterface $definition) {
  $this->dataDefinitions[$name] = $definition;
  return $this;
}