function drush_yaml_content_import in YAML Content 8
Same name and namespace in other branches
- 8.2 yaml_content.drush.inc \drush_yaml_content_import()
Import specified yaml content file(s).
Parameters
string $directory: The directory path containing the yaml content file(s) to be imported.
string $file: (Optional) The name of a file to be imported or an array of files to import. If this argument is not provided then all files in the directory matching `*.content.yml` are queued for import.
See also
\Drupal\yaml_content\Service\LoadHelper::importDirectory()
File
- ./
yaml_content.drush.inc, line 67 - Drush commands for the yaml_content module.
Code
function drush_yaml_content_import($directory, $file = NULL) {
$load_helper = \Drupal::service('yaml_content.load_helper');
$load_helper
->importDirectory($directory, $file);
}