You are here

function _dmu_build_target in Drupal 7 to 8/9 Module Upgrader 8

Build our target.

Parameters

string $module: Module name.

Return value

\Drupal\drupalmoduleupgrader\Target The target.

2 calls to _dmu_build_target()
drush_drupalmoduleupgrader_dmu_analyze in ./drupalmoduleupgrader.drush.inc
Analyzes what needs changing in a module to port it to Drupal 8.
drush_drupalmoduleupgrader_dmu_upgrade in ./drupalmoduleupgrader.drush.inc
Tries to automatically convert a Drupal 7 module to Drupal 8.

File

./drupalmoduleupgrader.drush.inc, line 227
Declarations for Drush.

Code

function _dmu_build_target($module) {
  $target = new Target(_dmu_get_directory($module), \Drupal::getContainer());
  drush_print(\Drupal::translation()
    ->translate('Indexing...'), 0, NULL, FALSE);
  $target
    ->buildIndex();
  drush_print(\Drupal::translation()
    ->translate('done.'));
  return $target;
}