function EditExpressionForm::getEditedExpression

Gets the currently edited expression from the given component.

Parameters

\Drupal\rules\Engine\RulesComponent $component: The component from which to get the expression.

Return value

\Drupal\rules\Engine\ExpressionInterface|null The expression object.

3 calls to EditExpressionForm::getEditedExpression()
EditExpressionForm::buildComponent in src/Form/EditExpressionForm.php
Builds an updated component object based upon the submitted form values.
EditExpressionForm::buildForm in src/Form/EditExpressionForm.php
Form constructor.
EditExpressionForm::getTitle in src/Form/EditExpressionForm.php
Provides the page title on the form.
1 method overrides EditExpressionForm::getEditedExpression()
AddExpressionForm::getEditedExpression in src/Form/AddExpressionForm.php
Gets the currently edited expression from the given component.

File

src/Form/EditExpressionForm.php, line 46

Class

EditExpressionForm
UI form to edit an expression like a condition or action in a rule.

Namespace

Drupal\rules\Form

Code

protected function getEditedExpression(RulesComponent $component) {
    $rule_expression = $component->getExpression();
    return $rule_expression->getExpression($this->uuid);
}