function features_form_submit in Features 7
Same name and namespace in other branches
- 6 features.admin.inc \features_form_submit()
- 7.2 features.admin.inc \features_form_submit()
Submit handler for the 'manage features' form
1 string reference to 'features_form_submit'
- features_admin_form in ./
features.admin.inc - Form constructor for the features configuration form.
File
- ./
features.admin.inc, line 659 - @todo.
Code
function features_form_submit(&$form, &$form_state) {
// Clear drupal caches after enabling a feature. We do this in a separate
// page callback rather than as part of the submit handler as some modules
// have includes/other directives of importance in hooks that have already
// been called in this page load.
$form_state['redirect'] = 'admin/structure/features/cleanup/clear';
$features = $form['#features'];
if (!empty($features)) {
$status = $form_state['values']['status'];
$install = array_keys(array_filter($status));
$disable = array_diff(array_keys($status), $install);
// Disable first. If there are any features that are disabled that are
// dependencies of features that have been queued for install, they will
// be re-enabled.
module_disable($disable);
features_install_modules($install);
}
}