You are here

function features_admin_components_revert in Features 7

Same name and namespace in other branches
  1. 6 features.admin.inc \features_admin_components_revert()
  2. 7.2 features.admin.inc \features_admin_components_revert()

Submit handler for revert form.

1 string reference to 'features_admin_components_revert'
features_admin_components in ./features.admin.inc
Display the components of a feature.

File

./features.admin.inc, line 606
@todo.

Code

function features_admin_components_revert(&$form, &$form_state) {
  module_load_include('inc', 'features', 'features.export');
  features_include();
  $module = $form_state['values']['module'];
  $revert = array();
  foreach (array_filter($form_state['values']['revert']) as $component => $status) {
    $revert[$module][] = $component;
    drupal_set_message(t('Reverted all <strong>@component</strong> components for <strong>@module</strong>.', array(
      '@component' => $component,
      '@module' => $module,
    )));
  }
  features_revert($revert);
  $form_state['redirect'] = 'admin/structure/features/' . $module;
}