features_form_submit
Drupal 7 features_form_submit(&$form, &$form_state)
Submit handler for the 'manage features' form
1 string reference to 'features_form_submit'
File
- sites/
all/ modules/ features/ features.admin.inc, line 641
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);
}
}

