public function beforeValidate()
    {
        if (!$theme = Theme::getEditTheme()) {
            throw new ApplicationException('Unable to find the active theme.');
        }

        $themeMap = $this->getSettingsValue('theme_map', []);
        $themeMap[$theme->getDirName()] = $this->getSettingsValue('cms_page');
        $this->setSettingsValue('theme_map', $themeMap);
    }
public function beforeValidate()
    {
        if (!$theme = Theme::getEditTheme()) {
            throw new ApplicationException('Unable to find the active theme.');
        }

        $themeMap = $this->getSettingsValue('theme_map', []);
        $themeMap[$theme->getDirName()] = $this->getSettingsValue('cms_page');
        $this->setSettingsValue('theme_map', $themeMap);
    }
public function beforeValidate ( ) { if ( ! $ theme = Theme :: getEditTheme ( ) ) { throw new ApplicationException ( 'Unable to find the active theme.' ) ; } $ themeMap = $ this -> getSettingsValue ( 'theme_map' , [ ] ) ; $ themeMap [ $ theme -> getDirName ( ) ] = $ this -> getSettingsValue ( 'cms_page' ) ; $ this -> setSettingsValue ( 'theme_map' , $ themeMap ) ; }
Ensure each theme has its own CMS page, store it inside a mapping array.
@return void
Ensure each theme has its own CMS page store it inside a mapping array .