function rb_block_rules_action_info in Rules Bonus Pack 7
Implements hook_rules_action_info().
File
- ./
rb_block.rules.inc, line 11 - Rules actions to more or disable a Drupal block. Plus some helper functions.
Code
function rb_block_rules_action_info() {
// Add actions that depend on required modules only.
$actions = array(
'rb_block_action_place_block' => array(
'label' => t('Place a block'),
'access' => 'administer blocks',
'parameter' => array(
'block' => array(
'type' => 'text',
'options list' => 'rb_block_block_list',
'label' => t('Block'),
'restriction' => 'input',
),
'region' => array(
'type' => 'text',
'options list' => 'rb_block_region_list',
'label' => t('New region'),
'restriction' => 'input',
),
'weight' => array(
'type' => 'integer',
'label' => t('Weight'),
),
),
'group' => t('Rules Bonus: Block'),
),
'rb_block_action_disable_block' => array(
'label' => t('Disable a block'),
'access' => 'administer blocks',
'parameter' => array(
'block' => array(
'type' => 'text',
'options list' => 'rb_block_block_list',
'label' => t('Block'),
'restriction' => 'input',
),
),
'group' => t('Rules Bonus: Block'),
),
);
return $actions;
}