function configuration_ui_activate_form_submit in Configuration Management 7.2
Submit handler for reverting configs.
1 string reference to 'configuration_ui_activate_form_submit'
File
- ui/
configuration_ui.admin.inc, line 381 - User interface functions for Configuration Management.
Code
function configuration_ui_activate_form_submit($form, &$form_state) {
$args = configuration_ui_get_form_components($form, $form_state);
$revert_dependencies = $form_state['values']['include_dependencies'];
$revert_optionals = $form_state['values']['include_optionals'];
$result = ConfigurationManagement::importToActiveStore($args, $revert_dependencies, $revert_optionals);
$imported_configurations = $result
->getInfo('imported');
if (!empty($imported_configurations)) {
foreach ($imported_configurations as $configuration) {
drupal_set_message(t('Reverted @configuration.', array(
'@configuration' => $configuration,
)));
}
}
$non_imported_configurations = $result
->getInfo('fail');
if (!empty($non_imported_configurations)) {
foreach ($non_imported_configurations as $configuration) {
drupal_set_message(t('@configuration could not be imported.', array(
'@configuration' => $configuration,
)), 'error');
}
}
}