You are here

public function YamlContentCommands::contentImportModule in YAML Content 8

Import yaml content from a module.

@command yaml_content:import:module @option create-new Set this to create content even if it is already in the system. @aliases ycim,yaml-content-import-module

Parameters

string $module: The machine name of a module to be searched for content.

string $file: (Optional) The name of a content file to be imported.

array $options: An associative array of options whose values come from cli, aliases, config, etc.

File

src/Commands/YamlContentCommands.php, line 45

Class

YamlContentCommands
YAML Content commands class for Drush 9.0.0-beta5 and above.

Namespace

Drupal\yaml_content\Commands

Code

public function contentImportModule($module, $file = NULL, array $options = [
  'create-new' => NULL,
]) {
  $this->loader
    ->importModule($module, $file);
}