public function DefaultContentCommands::contentExportModule in Default Content for D8 2.0.x
Same name and namespace in other branches
- 8 src/Commands/DefaultContentCommands.php \Drupal\default_content\Commands\DefaultContentCommands::contentExportModule()
Exports all the content defined in a module info file.
@command default-content:export-module @aliases dcem
Parameters
string $module: The name of the module.
File
- src/
Commands/ DefaultContentCommands.php, line 87
Class
- DefaultContentCommands
- Class DefaultContentCommands.
Namespace
Drupal\default_content\CommandsCode
public function contentExportModule($module) {
$module_folder = \Drupal::moduleHandler()
->getModule($module)
->getPath() . '/content';
$this->defaultContentExporter
->exportModuleContent($module, $module_folder);
}