create a custom rule action in drupal


<?php
/**
 * Implements hook_rules_action_info().
 */
function mysite_rules_action_info() {
  return array(
    'mysite_action_foo' => array(
      'label' => t('Klaatu Barata Necktie'),
      'group' => t('Silly Rules Examples'),
    ),
  );
}

/**
 * Rule action foo.
 */
function mysite_action_foo() {
  drupal_set_message("I'm a foo for you!");
}
?>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s