function composer_manager_settings_form in Composer Manager 7
Same name and namespace in other branches
- 6.2 composer_manager.admin.inc \composer_manager_settings_form()
- 6 composer_manager.admin.inc \composer_manager_settings_form()
- 7.2 composer_manager.admin.inc \composer_manager_settings_form()
Administrative settings for the Composer Manager module.
See also
composer_manager_settings_form_validate()
1 string reference to 'composer_manager_settings_form'
- composer_manager_menu in ./
composer_manager.module - Implements hook_menu().
File
- ./
composer_manager.admin.inc, line 15 - Administrative settings for the Composer Manager module.
Code
function composer_manager_settings_form($form, &$form_state) {
// Don't break sites that upgraded from <= 7.x-1.0-beta5.
composer_manager_beta5_compatibility();
$form['composer_manager_vendor_dir'] = array(
'#title' => 'Vendor Directory',
'#type' => 'textfield',
'#default_value' => variable_get('composer_manager_vendor_dir', 'sites/all/vendor'),
'#description' => t('The relative or absolute path to the vendor directory containing the Composer packages and autoload.php file.'),
);
$form['composer_manager_file_dir'] = array(
'#title' => 'Composer File Directory',
'#type' => 'textfield',
'#default_value' => composer_manager_file_dir(),
'#description' => t('The directory containing the composer.json file and where Composer commands are run.'),
);
$form['composer_manager_autobuild_file'] = array(
'#title' => 'Automatically build the composer.json file when enabling or disabling modules',
'#type' => 'checkbox',
'#default_value' => variable_get('composer_manager_autobuild_file', 1),
'#description' => t('Automatically build the consolidated composer.json for all contributed modules file in the vendor directory above when modules are enabled or disabled. Disable this setting if you want to maintain the composer.json file manually.'),
);
$form['composer_manager_autobuild_packages'] = array(
'#title' => 'Automatically update Composer dependencies when enabling or disabling modules with Drush',
'#type' => 'checkbox',
'#default_value' => variable_get('composer_manager_autobuild_packages', 1),
'#description' => t('Automatically build the consolidated composer.json file and run Composer\'s <code>!command</code> command when enabling or disabling modules with Drush. Disable this setting to manage the composer.json and dependencies manually.', array(
'!command' => 'update',
)),
);
$form['#validate'] = array(
'composer_manager_settings_form_validate',
);
return system_settings_form($form);
}