/** * {@inheritdoc} * * @param ThemeLoaderInterface $themeLoader */ public function __construct(ThemeLoaderInterface $themeLoader, $interface) { parent::__construct($interface); $themes = $themeLoader->load(); foreach ($themes as $theme) { $this->add($theme); } }
/** * @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); } }
public function __construct() { parent::__construct(ThemeInterface::class); }