function revision_scheduler_add_form in Revision scheduler 7
1 string reference to 'revision_scheduler_add_form'
- revision_scheduler_menu in ./
revision_scheduler.module - Implements hook_menu().
File
- ./
revision_scheduler.pages.inc, line 115
Code
function revision_scheduler_add_form($form, &$form_state, $entity_type, $entity) {
// Set a base form ID so that the submit hooks will automatically be added.
// And any form alteration to the scheduling form can use the same form ID.
$form_state['build_info']['base_form_id'] = 'revision_scheduler_edit_form';
list($entity_id, $revision_id) = entity_extract_ids($entity_type, $entity);
// Pass the form into the edit form to get most of the form elements.
$operation = new stdClass();
$operation->id = NULL;
$operation->entity_type = $entity_type;
$operation->entity_id = $entity_id;
$operation->revision_id = $revision_id;
$operation->operation = NULL;
$operation->uid = $GLOBALS['user']->uid;
return revision_scheduler_edit_form($form, $form_state, $operation);
}