/** * @return ThemeInterface */ public function getActiveTheme() { if (!$this->container->hasParameter('cms.active_theme')) { throw new \RuntimeException('No active theme set.'); } $themeName = $this->container->getParameter('cms.active_theme'); if (!isset($this->themes[$themeName])) { throw new \InvalidArgumentException("There is no theme [{$themeName}]."); } return $this->themes[$themeName]; }