function _configuration_stop_tracking in Configuration Management 7.2
1 string reference to '_configuration_stop_tracking'
- configuration_drush_command in ./
configuration.drush.inc - Implements of hook_drush_command().
File
- ./
configuration.drush.inc, line 379 - configuration.drush.inc Let you perform configuration actions from the console.
Code
function _configuration_stop_tracking() {
$stop_tracking_all = drush_get_option('all');
if (!empty($stop_tracking_all)) {
$args = _components_indentifier_formater();
}
else {
$args = func_get_args();
}
if (empty($args)) {
return drush_set_error('', dt('No configurations were selected to export'));
}
$handlers = ConfigurationManagement::getConfigurationHandler();
foreach ($args as $arg) {
list($component, $identifier) = explode('.', $arg, 2);
if (empty($handlers[$component])) {
return drush_set_error('', dt('The component @component is not valid or the module to export the configuration is not installed.', array(
'@component' => $component,
)));
}
if (empty($identifier)) {
return drush_set_error('', dt('No identifier supplied for @arg.', array(
'@arg' => $arg,
)));
}
}
$rows = array();
$stop_tracking_dependencies = !drush_get_option('exclude-dependencies');
$stop_tracking_optionals = !drush_get_option('exclude-optionals');
$result = ConfigurationManagement::stopTracking($args, $stop_tracking_dependencies, $stop_tracking_optionals);
$configurations = $result
->getInfo('untracked');
if (!empty($configurations)) {
foreach ($configurations as $untracked) {
$rows[]['untracked'] = $untracked;
}
drush_log(dt('The configurations changes for for the following items are not being tracked anymore.'), 'ok');
drush_print_table($rows);
}
}