function rules_invoke_component

Invokes a rule component, e.g. a rule set.

Parameters

$component_name: The component's name.

$args: Pass further parameters as required for the invoked component.

Return value

array An array of variables as provided by the component, or FALSE in case the component could not be executed.

2 calls to rules_invoke_component()
RulesTestCase::testDependencies in tests/rules.test
Tests handling dependencies.
RulesTestCase::testRuleSets in tests/rules.test
Tests making use of rule sets.

File

./rules.module, line 1142

Code

function rules_invoke_component() {
    $args = func_get_args();
    $name = array_shift($args);
    if ($component = rules_get_cache('comp_' . $name)) {
        return $component->executeByArgs($args);
    }
    return FALSE;
}