Extension/Theme/Model/ThemeManager.php
public function getTheme($themeName)
    {
        if (empty($themeName)) {
            throw new \InvalidArgumentException('The theme name must not be empty.');
        } elseif (!$this->hasTheme($themeName)) {
            throw new \LogicException(sprintf('Unable to retrieve definition for theme "%s".', $themeName));
        }

        if (!isset($this->instances[$themeName])) {
            $theme = $this->themeFactory->create($themeName, $this->themeDefinitions[$themeName]);
            $this->instances[$themeName] = $this->mergePageTemplates($theme);
        }

        return $this->instances[$themeName];
    }
public function getTheme($themeName)
    {
        if (empty($themeName)) {
            throw new \InvalidArgumentException('The theme name must not be empty.');
        } elseif (!$this->hasTheme($themeName)) {
            throw new \LogicException(sprintf('Unable to retrieve definition for theme "%s".', $themeName));
        }

        if (!isset($this->instances[$themeName])) {
            $theme = $this->themeFactory->create($themeName, $this->themeDefinitions[$themeName]);
            $this->instances[$themeName] = $this->mergePageTemplates($theme);
        }

        return $this->instances[$themeName];
    }
public function getTheme ( $ themeName ) { if ( empty ( $ themeName ) ) { throw new \ InvalidArgumentException ( 'The theme name must not be empty.' ) ; } elseif ( ! $ this -> hasTheme ( $ themeName ) ) { throw new \ LogicException ( sprintf ( 'Unable to retrieve definition for theme "%s".' , $ themeName ) ) ; } if ( ! isset ( $ this -> instances [ $ themeName ] ) ) { $ theme = $ this -> themeFactory -> create ( $ themeName , $ this -> themeDefinitions [ $ themeName ] ) ; $ this -> instances [ $ themeName ] = $ this -> mergePageTemplates ( $ theme ) ; } return $ this -> instances [ $ themeName ] ; }
Gets theme model instance

@param string $themeName

@return Theme
Gets theme model instance