function ExpressionContainerInterface::addExpression
Creates and adds an expression.
Parameters
string $plugin_id: The id of the expression plugin to add.
\Drupal\rules\Context\ContextConfig $config: (optional) The configuration for the specified plugin.
Return value
$this
Throws
\Drupal\rules\Exception\InvalidExpressionException Thrown if the wrong expression is passed; e.g. if a condition expression is added to an action expression container.
2 methods override ExpressionContainerInterface::addExpression()
- ExpressionContainerBase::addExpression in src/
Engine/ ExpressionContainerBase.php - Creates and adds an expression.
- RuleExpression::addExpression in src/
Plugin/ RulesExpression/ RuleExpression.php - Creates and adds an expression.
File
-
src/
Engine/ ExpressionContainerInterface.php, line 30
Class
- ExpressionContainerInterface
- Defines a common interface for expressions containing other expressions.
Namespace
Drupal\rules\EngineCode
public function addExpression($plugin_id, ContextConfig $config = NULL);