protected function DrupalmoduleupgraderCommands::dmuBuildTarget in Drupal 7 to 8/9 Module Upgrader 8
Builds target module.
Parameters
string $module: Module name.
null $path: Path of the module.
Return value
\Drupal\drupalmoduleupgrader\Target Target module.
2 calls to DrupalmoduleupgraderCommands::dmuBuildTarget()
- DrupalmoduleupgraderCommands::analyze in src/
Commands/ DrupalmoduleupgraderCommands.php - Analyzes a Drupal 7 module and reports the changes needed to port it to Drupal 8 or Drupal 9.
- DrupalmoduleupgraderCommands::upgrade in src/
Commands/ DrupalmoduleupgraderCommands.php - Upgrades a Drupal 7 module to Drupal 8 or Drupal 9.
File
- src/
Commands/ DrupalmoduleupgraderCommands.php, line 246
Class
Namespace
Drupal\drupalmoduleupgrader\CommandsCode
protected function dmuBuildTarget(string $module, $path = NULL) {
$module_directory = $path ?? $this
->dmuGetDirectory($module);
$target = new Target($module_directory, \Drupal::getContainer());
$this
->output()
->writeln('Indexing...');
$target
->buildIndex();
$this
->output()
->writeln('done.');
return $target;
}