function deploy_list in Deploy - Content Staging 5
list deployment plan items form
1 string reference to 'deploy_list'
- deploy_menu in ./
deploy.module - Implementation of hook_menu().
File
- ./
deploy.module, line 375
Code
function deploy_list($pid = NULL) {
$items = deploy_get_plan_items($pid);
if (is_null($pid) || empty($items)) {
drupal_goto('/admin/build/deploy');
}
// Build form tree
$form['#tree'] = TRUE;
foreach ($items as $i => $item) {
$account = user_load(array(
'uid' => $item['uid'],
));
$added_by = $account->name . " on " . format_date($item['ts'], 'small');
$form[$i]['module'] = array(
'#type' => 'item',
'#value' => $item['module'],
);
$form[$i]['description'] = array(
'#type' => item,
'#value' => $item['description'],
);
$form[$i]['added_by'] = array(
'#type' => item,
'#value' => $added_by,
);
$form[$i]['weight'] = array(
'#type' => 'weight',
'#default_value' => $item['weight'],
);
$form[$i]['iid'] = array(
'#type' => 'hidden',
'#value' => $item['iid'],
);
}
$form['pid'] = array(
'#type' => 'hidden',
'#value' => $pid,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save plan'),
);
return $form;
}