You are here

function composer_manager_rebuild_form in Composer Manager 6

Same name and namespace in other branches
  1. 6.2 composer_manager.admin.inc \composer_manager_rebuild_form()
  2. 7.2 composer_manager.admin.inc \composer_manager_rebuild_form()
  3. 7 composer_manager.admin.inc \composer_manager_rebuild_form()

Exposes a button that forces a rebuild of the composer.json file.

See also

composer_manager_rebuild_form_submit()

1 string reference to 'composer_manager_rebuild_form'
composer_manager_packages_page in ./composer_manager.admin.inc
Page callback; Shows the status of all packages required by contrib.

File

./composer_manager.admin.inc, line 215
Administrative settings for the Composer Manager module.

Code

function composer_manager_rebuild_form(&$form_state) {
  $file_dir = variable_get('composer_manager_file_dir', file_directory_path() . '/composer');
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Rebuild composer.json file'),
    '#disabled' => 0 !== strpos($file_dir, 'public://') && (!is_dir($file_dir) || !is_writable($file_dir)),
  );
  $form['#submit'] = array(
    'composer_manager_rebuild_form_submit',
  );
  return $form;
}