You are here

function entity_rules_invoke_component in Entity Rules 7

Invokes a rule component, for example a rule set.

Parameters

$component_name: The component's name.

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

Return value

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

1 call to entity_rules_invoke_component()
_entity_rules_invoke_rules in ./entity_rules.module
Invokes Rules for an entity given an operation.

File

./entity_rules.module, line 1030
Module file for the Entity Rules.

Code

function entity_rules_invoke_component($name, &$args) {
  if ($component = rules_get_cache('comp_' . $name)) {
    return $component
      ->executeByArgs($args);
  }
  return FALSE;
}