You are here

public function ExecutionMetadataState::getDataDefinition in Rules 8.3

Retrieve a data definition in this execution metadata state.

Parameters

string $name: The variable name to get the data definition for.

Return value

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

Overrides ExecutionMetadataStateInterface::getDataDefinition

1 call to ExecutionMetadataState::getDataDefinition()
ExecutionMetadataState::fetchDefinitionByPropertyPath in src/Context/ExecutionMetadataState.php
Applies a data selector and returns the corresponding data definition.

File

src/Context/ExecutionMetadataState.php, line 61

Class

ExecutionMetadataState
The state used during configuration time holding data definitions.

Namespace

Drupal\rules\Context

Code

public function getDataDefinition($name) {
  if (!array_key_exists($name, $this->dataDefinitions)) {
    throw new IntegrityException("Unable to get variable '{$name}'; it is not defined.");
  }
  return $this->dataDefinitions[$name];
}