function rules_scheduler_rules_action_info in Rules 7.2
Same name and namespace in other branches
- 6 rules_scheduler/rules_scheduler.rules.inc \rules_scheduler_rules_action_info()
Implements hook_rules_action_info().
Related topics
File
- rules_scheduler/
rules_scheduler.rules.inc, line 15 - Rules integration for the rules scheduler module.
Code
function rules_scheduler_rules_action_info() {
$items['schedule'] = array(
'label' => t('Schedule component evaluation'),
'group' => t('Rules scheduler'),
'base' => 'rules_scheduler_action_schedule',
'named parameter' => TRUE,
'parameter' => array(
'component' => array(
'type' => 'text',
'label' => t('Component'),
'options list' => 'rules_scheduler_component_options_list',
'restriction' => 'input',
'description' => 'Select the component to schedule. Only components containing actions are available – no condition sets.',
),
'date' => array(
'type' => 'date',
'label' => t('Scheduled evaluation date'),
),
'identifier' => array(
'type' => 'text',
'label' => t('Identifier'),
'description' => t('A string used for identifying this task. Any existing tasks for this component with the same identifier will be replaced.'),
'optional' => TRUE,
),
),
);
// Add action to delete scheduled tasks.
$items['schedule_delete'] = array(
'label' => t('Delete scheduled tasks'),
'group' => t('Rules scheduler'),
'base' => 'rules_scheduler_action_delete',
'parameter' => array(
'component' => array(
'type' => 'text',
'label' => t('Component'),
'options list' => 'rules_scheduler_component_options_list',
'description' => t('The component for which scheduled tasks will be deleted.'),
'optional' => TRUE,
),
'task' => array(
'type' => 'text',
'label' => t('Task identifier'),
'description' => t('All tasks that are annotated with the given identifier will be deleted.'),
'optional' => TRUE,
),
),
);
return $items;
}