X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Fsrc%2FDrupal%2FCommands%2Fcore%2FDrupalCommands.php;fp=vendor%2Fdrush%2Fdrush%2Fsrc%2FDrupal%2FCommands%2Fcore%2FDrupalCommands.php;h=8d0c98afa33db689fb1c9bad296ccd7b088dbd61;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=75e4781b7f5573b33373bdc030447722ab5aec16;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/vendor/drush/drush/src/Drupal/Commands/core/DrupalCommands.php b/vendor/drush/drush/src/Drupal/Commands/core/DrupalCommands.php index 75e4781b7..8d0c98afa 100644 --- a/vendor/drush/drush/src/Drupal/Commands/core/DrupalCommands.php +++ b/vendor/drush/drush/src/Drupal/Commands/core/DrupalCommands.php @@ -42,6 +42,7 @@ class DrupalCommands extends DrushCommands /** * @param \Drupal\Core\CronInterface $cron + * @param ModuleHandlerInterface $moduleHandler */ public function __construct(CronInterface $cron, ModuleHandlerInterface $moduleHandler) { @@ -64,39 +65,6 @@ class DrupalCommands extends DrushCommands } } - /** - * Compile all Twig template(s). - * - * @command twig:compile - * @aliases twigc,twig-compile - */ - public function twigCompile() - { - require_once DRUSH_DRUPAL_CORE . "/themes/engines/twig/twig.engine"; - // Scan all enabled modules and themes. - $modules = array_keys($this->getModuleHandler()->getModuleList()); - foreach ($modules as $module) { - $searchpaths[] = drupal_get_path('module', $module); - } - - $themes = \Drupal::service('theme_handler')->listInfo(); - foreach ($themes as $name => $theme) { - $searchpaths[] = $theme->getPath(); - } - - $files = Finder::create() - ->files() - ->name('*.html.twig') - ->exclude('tests') - ->in($searchpaths); - foreach ($files as $file) { - $relative = Path::makeRelative($file->getRealPath(), Drush::bootstrapManager()->getRoot()); - // @todo Dynamically disable twig debugging since there is no good info there anyway. - twig_render_template($relative, ['theme_hook_original' => '']); - $this->logger()->success(dt('Compiled twig template !path', ['!path' => $relative])); - } - } - /** * Information about things that may be wrong in your Drupal installation. *