Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / drush / drush / src / Drupal / Commands / core / DrupalCommands.php
index 75e4781b7f5573b33373bdc030447722ab5aec16..8d0c98afa33db689fb1c9bad296ccd7b088dbd61 100644 (file)
@@ -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.
      *