src/ScContent/Controller/Back/ThemeController.php
public function enableAction()
    {
        $themeName = $this->params()->fromRoute('theme');
        if (! $themeName) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('Theme was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/theme')
                ->setStatusCode(303);
        }

        $service = $this->getThemeService();
        if (! $service->enableTheme($themeName)) {
            foreach ($service->getMessages() as $message) {
                $this->flashMessenger()->addMessage($message);
            }
        }
        return $this->redirect()->toRoute('sc-admin/theme');
    }
public function enableAction()
    {
        $themeName = $this->params()->fromRoute('theme');
        if (! $themeName) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('Theme was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/theme')
                ->setStatusCode(303);
        }

        $service = $this->getThemeService();
        if (! $service->enableTheme($themeName)) {
            foreach ($service->getMessages() as $message) {
                $this->flashMessenger()->addMessage($message);
            }
        }
        return $this->redirect()->toRoute('sc-admin/theme');
    }
public function enableAction ( ) { $ themeName = $ this -> params ( ) -> fromRoute ( 'theme' ) ; if ( ! $ themeName ) { $ this -> flashMessenger ( ) -> addMessage ( $ this -> scTranslate ( 'Theme was not specified.' ) ) ; return $ this -> redirect ( ) -> toRoute ( 'sc-admin/theme' ) -> setStatusCode ( 303 ) ; } $ service = $ this -> getThemeService ( ) ; if ( ! $ service -> enableTheme ( $ themeName ) ) { foreach ( $ service -> getMessages ( ) as $ message ) { $ this -> flashMessenger ( ) -> addMessage ( $ message ) ; } } return $ this -> redirect ( ) -> toRoute ( 'sc-admin/theme' ) ; }
Enable theme.

@return \Zend\Stdlib\ResponseInterface
Enable theme .