function RulesActionContainer::action

Adds an action to the container.

Pass in either an instance of the RulesActionInterface or the arguments as needed by rules_action().

Return value

$this

1 call to RulesActionContainer::action()
RulesRuleSet::rule in includes/rules.plugins.inc

File

includes/rules.core.inc, line 2540

Class

RulesActionContainer
Base class for all action containers.

Code

public function action($name, $settings = array()) {
    $action = is_object($name) && $name instanceof RulesActionInterface ? $name : rules_action($name, $settings);
    $action->setParent($this);
    return $this;
}