src/Controller/PlatformSchemeController.php
public function getStyleColorCssAction()
    {
        $primaryColor = null;
        $secondaryColor = null;
        $view = new ViewModel();
        $response = $this->getResponse();

        $view->setTerminal(true);

        $response->getHeaders()
            ->addHeaderLine('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0')
            ->addHeaderLine('Pragma'       , 'no-cache')
            ->addHeaderLine('Content-Type' , 'text/css;charset=UTF-8');

        $schemeData = $this->getPlatformSchemeSvc()->getCurrentScheme(true);

        if ($schemeData) {

            $colors = json_decode($schemeData->getColors(), true);

            if (is_array($colors)) {
                foreach ($colors as $colorKey => $colorValue) {
                    $view->$colorKey = $colorValue;
                }
            }
        }

        return $view;
    }
public function getStyleColorCssAction()
    {
        $primaryColor = null;
        $secondaryColor = null;
        $view = new ViewModel();
        $response = $this->getResponse();

        $view->setTerminal(true);

        $response->getHeaders()
            ->addHeaderLine('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0')
            ->addHeaderLine('Pragma'       , 'no-cache')
            ->addHeaderLine('Content-Type' , 'text/css;charset=UTF-8');

        $schemeData = $this->getPlatformSchemeSvc()->getCurrentScheme(true);

        if ($schemeData) {

            $colors = json_decode($schemeData->getColors(), true);

            if (is_array($colors)) {
                foreach ($colors as $colorKey => $colorValue) {
                    $view->$colorKey = $colorValue;
                }
            }
        }

        return $view;
    }
public function getStyleColorCssAction ( ) { $ primaryColor = null ; $ secondaryColor = null ; $ view = new ViewModel ( ) ; $ response = $ this -> getResponse ( ) ; $ view -> setTerminal ( true ) ; $ response -> getHeaders ( ) -> addHeaderLine ( 'Cache-Control' , 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0' ) -> addHeaderLine ( 'Pragma' , 'no-cache' ) -> addHeaderLine ( 'Content-Type' , 'text/css;charset=UTF-8' ) ; $ schemeData = $ this -> getPlatformSchemeSvc ( ) -> getCurrentScheme ( true ) ; if ( $ schemeData ) { $ colors = json_decode ( $ schemeData -> getColors ( ) , true ) ; if ( is_array ( $ colors ) ) { foreach ( $ colors as $ colorKey => $ colorValue ) { $ view -> $ colorKey = $ colorValue ; } } } return $ view ; }
Generates a dynamic CSS virtual file that will be rendered
in the platform
@return ViewModel
Generates a dynamic CSS virtual file that will be rendered in the platform