function drush_config_devel_import_one in Configuration development 8
Drush command callback.
1 call to drush_config_devel_import_one()
- drush_config_devel_import_config in drush/
config_devel.drush.inc - Imports a list of configuration entities
File
- drush/
config_devel.drush.inc, line 129 - Configuration development module drush integration.
Code
function drush_config_devel_import_one($path) {
$contents = '';
if (!file_exists($path)) {
if (substr($path, -4) != '.yml') {
$contents = file_get_contents('php://stdin');
}
elseif (!empty($_SERVER['PWD'])) {
$path = $_SERVER['PWD'] . '/' . trim($path, '/');
}
}
if ($contents || file_exists($path)) {
\Drupal::service('config_devel.auto_import_subscriber')
->importOne($path, '', $contents);
}
else {
drush_log("file '{$path}' not found", 'error');
exit;
}
}