Posted by arbitrator on September 30, 2011 at 12:57pm
I am new to Drupal. I am using Drupal 7. After installing drupal 7. I created 2 files. beep.module and beep.info Following is beep.module
<?php
/
* @file
* Provide a simulated beep.
/
function beep_beep() {
watchdog('beep', 'Beep!');
}
/
Implementation of hook_action
1) tell which triggers it supports
2) define the action
*/
function beep_action_info () {
return array( 'beep_beep_action' => array('type' => 'system', 'label' => t('Beep annoyingly'),'configurable' => FALSE,'triggers' => array('node_view', 'node_insert', 'node_update', 'node_delete'),
),
'beep_multiple_beep_action' => array(
'type' => 'system',
'label' => t('Beep multiple times'),
'configurable' => TRUE,
'triggers' => array('node_view', 'node_insert', 'node_update', 'node_delete'),
),
);
}
/
* Simulate a beep. A Drupal action.
*/
function beep_beep_action() {
beep_beep();
}and a file beep.info
name = Beep
description = Simulates a system beep.
package = Pro Drupal Development
core = 7.x
files[] = beep.modulethen in http://localhost/drupal/?q=admin/structure/trigger/node section I see a Trigger after saving new content Beep Anonymously. But I do not see Beep Multiple Times triger.Which is the expected behavior. Can some one point out to what can be done for the same?