Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  *
  * @param ThemeLoaderInterface $themeLoader
  */
 public function __construct(ThemeLoaderInterface $themeLoader, $interface)
 {
     parent::__construct($interface);
     $themes = $themeLoader->load();
     foreach ($themes as $theme) {
         $this->add($theme);
     }
 }
Exemplo n.º 2
0
 /**
  * @param array|ThemeInterface[] $themes Can be an array of serialized themes
  */
 public function __construct(array $themes = [])
 {
     parent::__construct(ThemeInterface::class);
     foreach ($themes as $theme) {
         if (!$theme instanceof ThemeInterface) {
             $theme = unserialize($theme);
         }
         $this->add($theme);
     }
 }
Exemplo n.º 3
0
 public function __construct()
 {
     parent::__construct(ThemeInterface::class);
 }