Version 1
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / PreprocessManager.php
1 <?php
2 /**
3  * @file
4  * Contains \Drupal\bootstrap\Plugin\PreprocessManager.
5  */
6
7 namespace Drupal\bootstrap\Plugin;
8
9 use Drupal\bootstrap\Theme;
10
11 /**
12  * Manages discovery and instantiation of Bootstrap preprocess hooks.
13  *
14  * @ingroup plugins_preprocess
15  */
16 class PreprocessManager extends PluginManager {
17
18   /**
19    * Constructs a new \Drupal\bootstrap\Plugin\PreprocessManager object.
20    *
21    * @param \Drupal\bootstrap\Theme $theme
22    *   The theme to use for discovery.
23    */
24   public function __construct(Theme $theme) {
25     parent::__construct($theme, 'Plugin/Preprocess', 'Drupal\bootstrap\Plugin\Preprocess\PreprocessInterface', 'Drupal\bootstrap\Annotation\BootstrapPreprocess');
26     $this->setCacheBackend(\Drupal::cache('discovery'), 'theme:' . $theme->getName() . ':preprocess', $this->getCacheTags());
27   }
28
29 }