concrete/src/Page/Page.php
public function getCollectionThemeObject()
    {
        if (!isset($this->themeObject)) {
            $app = Facade::getFacadeApplication();
            $tmpTheme = $app->make(ThemeRouteCollection::class)
                ->getThemeByRoute($this->getCollectionPath());
            if (isset($tmpTheme[0])) {
                switch ($tmpTheme[0]) {
                    case VIEW_CORE_THEME:
                        $this->themeObject = new \Concrete\Theme\Concrete\PageTheme();
                        break;
                    case 'dashboard':
                        $this->themeObject = new \Concrete\Theme\Dashboard\PageTheme();
                        break;
                    default:
                        $this->themeObject = PageTheme::getByHandle($tmpTheme[0]);
                        break;
                }
            } elseif ($this->vObj->pThemeID < 1) {
                $this->themeObject = PageTheme::getSiteTheme();
            } else {
                $this->themeObject = PageTheme::getByID($this->vObj->pThemeID);
            }
        }
        if (!$this->themeObject) {
            $this->themeObject = PageTheme::getSiteTheme();
        }

        return $this->themeObject;
    }
public function getCollectionThemeObject()
    {
        if (!isset($this->themeObject)) {
            $app = Facade::getFacadeApplication();
            $tmpTheme = $app->make(ThemeRouteCollection::class)
                ->getThemeByRoute($this->getCollectionPath());
            if (isset($tmpTheme[0])) {
                switch ($tmpTheme[0]) {
                    case VIEW_CORE_THEME:
                        $this->themeObject = new \Concrete\Theme\Concrete\PageTheme();
                        break;
                    case 'dashboard':
                        $this->themeObject = new \Concrete\Theme\Dashboard\PageTheme();
                        break;
                    default:
                        $this->themeObject = PageTheme::getByHandle($tmpTheme[0]);
                        break;
                }
            } elseif ($this->vObj->pThemeID < 1) {
                $this->themeObject = PageTheme::getSiteTheme();
            } else {
                $this->themeObject = PageTheme::getByID($this->vObj->pThemeID);
            }
        }
        if (!$this->themeObject) {
            $this->themeObject = PageTheme::getSiteTheme();
        }

        return $this->themeObject;
    }
public function getCollectionThemeObject ( ) { if ( ! isset ( $ this -> themeObject ) ) { $ app = Facade :: getFacadeApplication ( ) ; $ tmpTheme = $ app -> make ( ThemeRouteCollection :: class ) -> getThemeByRoute ( $ this -> getCollectionPath ( ) ) ; if ( isset ( $ tmpTheme [ 0 ] ) ) { switch ( $ tmpTheme [ 0 ] ) { case VIEW_CORE_THEME : $ this -> themeObject = new \ Concrete \ Theme \ Concrete \ PageTheme ( ) ; break ; case 'dashboard' : $ this -> themeObject = new \ Concrete \ Theme \ Dashboard \ PageTheme ( ) ; break ; default : $ this -> themeObject = PageTheme :: getByHandle ( $ tmpTheme [ 0 ] ) ; break ; } } elseif ( $ this -> vObj -> pThemeID < 1 ) { $ this -> themeObject = PageTheme :: getSiteTheme ( ) ; } else { $ this -> themeObject = PageTheme :: getByID ( $ this -> vObj -> pThemeID ) ; } } if ( ! $ this -> themeObject ) { $ this -> themeObject = PageTheme :: getSiteTheme ( ) ; } return $ this -> themeObject ; }
Get the collection's theme object.

@return \Concrete\Core\Page\Theme\Theme
Get the collection s theme object .