You are here

function drush_default_content_export_module in Default Content for D8 2.0.x

Same name and namespace in other branches
  1. 8 drush/default_content.drush.inc \drush_default_content_export_module()

Exports all of the content for a given module.

Parameters

string $module_name: The module name to export.

File

drush/default_content.drush.inc, line 97
Drush integration for the default_content module.

Code

function drush_default_content_export_module($module_name) {

  /** @var \Drupal\default_content\ExporterInterface $exporter */
  $exporter = \Drupal::service('default_content.exporter');
  $module_folder = \Drupal::moduleHandler()
    ->getModule($module_name)
    ->getPath() . '/content';
  $exporter
    ->exportModuleContent($module_name, $module_folder);
}