function composer_manager_settings_form in Composer Manager 6
Same name and namespace in other branches
- 6.2 composer_manager.admin.inc \composer_manager_settings_form()
- 7.2 composer_manager.admin.inc \composer_manager_settings_form()
- 7 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_state) {
$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' => variable_get('composer_manager_file_dir', file_directory_path() . '/composer'),
'#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 in the Drupal UI',
'#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 in the Drupal UI. 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);
}