function rules_scheduler_schedule_form
Configuration form to manually schedule a rules component.
3 string references to 'rules_scheduler_schedule_form'
- hook_rules_ui_menu_alter in ./
rules.api.php - Allows modules to alter or to extend the provided Rules UI.
- RulesUIController::config_menu in ui/
ui.controller.inc - Generates menu items to manipulate rules configurations.
- rules_scheduler_rules_ui_menu_alter in rules_scheduler/
rules_scheduler.module - Implements hook_rules_ui_menu_alter().
File
-
rules_scheduler/
rules_scheduler.admin.inc, line 111
Code
function rules_scheduler_schedule_form($form, &$form_state, $rules_config, $base_path) {
// Only components can be scheduled.
if (!$rules_config instanceof RulesTriggerableInterface) {
RulesPluginUI::$basePath = $base_path;
$form_state['component'] = $rules_config->name;
$action = rules_action('schedule', array(
'component' => $rules_config->name,
));
$action->form($form, $form_state);
// The component should be fixed, so hide the parameter for it.
$form['parameter']['component']['#access'] = FALSE;
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Schedule'),
);
$form['#validate'] = array(
'rules_ui_form_rules_config_validate',
);
return $form;
}
drupal_not_found();
exit;
}