function node_deploy_operations_add_form in Deploy - Content Staging 6
Display node "add to plan" form.
Parameters
$form_state: FAPI form state
$nids: The nids of the nodes we're attempting to deploy.
Return value
FAPI array
See also
1 string reference to 'node_deploy_operations_add_form'
- node_deploy_menu in modules/
node_deploy/ node_deploy.module - Implementation of hook_menu().
File
- modules/
node_deploy/ node_deploy.pages.inc, line 76 - Page handlers for node deployment pages.
Code
function node_deploy_operations_add_form($form_state, $nids) {
// If no nodes selected then bail.
if (!$nids) {
drupal_set_message('No nodes selected for deployment.');
drupal_goto('admin/content/node');
}
$form['pid'] = array(
'#title' => t('Deployment Plan'),
'#type' => 'select',
'#options' => deploy_get_plan_options(),
'#required' => TRUE,
'#description' => t('The deployment plan to add these nodes to.'),
);
$form['nids'] = array(
'#type' => 'hidden',
'#default_value' => $nids,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}