function deploy_auto_plan_settings in Deploy - Content Staging 7.3
Same name and namespace in other branches
- 7.2 modules/deploy_auto_plan/deploy_auto_plan.module \deploy_auto_plan_settings()
Admin settings form.
1 string reference to 'deploy_auto_plan_settings'
- deploy_auto_plan_menu in modules/
deploy_auto_plan/ deploy_auto_plan.module - Implements hook_menu().
File
- modules/
deploy_auto_plan/ deploy_auto_plan.module, line 109 - Deploy Auto Plan module functions.
Code
function deploy_auto_plan_settings($form, $form_state) {
$plans = _deploy_auto_plan_plans_list();
if (!count($plans)) {
$msg = t('No deployment plans configured.');
if (module_exists('deploy_ui') && user_access('administer deployment plans')) {
$url = url('admin/structure/deploy/plans');
$msg = t('No deployment plans configured. <a href="!url">Add a plan</a>.', array(
'!url' => $url,
));
}
return array(
'text' => array(
'#markup' => $msg,
),
);
}
$form['text'] = array(
'#markup' => t('Select which deployment plan all modified entities should be added to.'),
);
$form['deploy_auto_plan_name'] = array(
'#type' => 'select',
'#title' => t('Plan'),
'#empty_option' => t('- None -'),
'#options' => $plans,
'#default_value' => variable_get('deploy_auto_plan_name', NULL),
);
return system_settings_form($form);
}