function RulesComponent::getConfiguration

Gets the configuration array of this component.

Return value

array The configuration of this component. It contains the following keys:

  • expression: The configuration of the contained expression, including a nested 'id' key.
  • context_definitions: Array of context definition arrays, keyed by context name.
  • provided_context: The names of the context that is provided back.

File

src/Engine/RulesComponent.php, line 116

Class

RulesComponent
Handles executable Rules components.

Namespace

Drupal\rules\Engine

Code

public function getConfiguration() {
    return [
        'expression' => $this->expression
            ->getConfiguration(),
        'context_definitions' => array_map(function (ContextDefinitionInterface $definition) {
            return $definition->toArray();
        }, $this->contextDefinitions),
        'provided_context_definitions' => $this->providedContext,
    ];
}