class RulesTestClassAction
Action for testing writing class-based actions.
Hierarchy
- class \RulesPluginHandlerBase extends \FacesExtender implements \RulesPluginHandlerInterface
- class \RulesActionHandlerBase extends \RulesPluginHandlerBase implements \RulesActionHandlerInterface
- class \RulesTestClassAction extends \RulesActionHandlerBase
- class \RulesActionHandlerBase extends \RulesPluginHandlerBase implements \RulesActionHandlerInterface
Expanded class hierarchy of RulesTestClassAction
File
-
tests/
rules_test.rules.inc, line 249
View source
class RulesTestClassAction extends RulesActionHandlerBase {
/**
* Defines the action.
*/
public static function getInfo() {
return array(
'name' => 'rules_test_class_action',
'label' => t('Test class based action'),
'group' => t('Node'),
'parameter' => array(
'node' => array(
'type' => 'node',
'label' => t('Node'),
),
),
);
}
/**
* Executes the action.
*/
public function execute($node) {
rules_log('Action called with node ' . $node->nid);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
RulesTestClassAction::execute | public | function | Executes the action. |
RulesTestClassAction::getInfo | public static | function | Defines the action. |