public function RuleExpression::addAction in Rules 8.3
Creates an action expression and adds it to the container.
Parameters
string $action_id: The action plugin id.
\Drupal\rules\Context\ContextConfig $config: (optional) The configuration for the specified plugin.
Return value
$this
Overrides RuleExpressionInterface::addAction
File
- src/
Plugin/ RulesExpression/ RuleExpression.php, line 154
Class
- RuleExpression
- Provides a rule, executing actions when conditions are met.
Namespace
Drupal\rules\Plugin\RulesExpressionCode
public function addAction($action_id, ContextConfig $config = NULL) {
return $this->actions
->addAction($action_id, $config);
}