class RulesTestClassAction

Action for testing writing class-based actions.

Hierarchy

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.