public function updateActionGet($style) : object
    {
        $response = $this->di->get("response");
        $session = $this->di->get("session");

        $key = $this->cssUrl . "/" . $style . ".css";
        $keyMin = $this->cssUrl . "/" . $style . ".min.css";

        if ($style === "none") {
            $session->set("flashmessage", "Unsetting the style and using the default style.");
            $session->set(self::$key, null);
        } elseif (array_key_exists($keyMin, $this->styles)) {
            $session->set("flashmessage", "Now using the style '$keyMin'.");
            $session->set(self::$key, $keyMin);
        } elseif (array_key_exists($key, $this->styles)) {
            $session->set("flashmessage", "Now using the style '$key'.");
            $session->set(self::$key, $key);
        }

        $url = $session->getOnce("redirect", "style");
        return $response->redirect($url);
    }
public function updateActionGet($style) : object
    {
        $response = $this->di->get("response");
        $session = $this->di->get("session");

        $key = $this->cssUrl . "/" . $style . ".css";
        $keyMin = $this->cssUrl . "/" . $style . ".min.css";

        if ($style === "none") {
            $session->set("flashmessage", "Unsetting the style and using the default style.");
            $session->set(self::$key, null);
        } elseif (array_key_exists($keyMin, $this->styles)) {
            $session->set("flashmessage", "Now using the style '$keyMin'.");
            $session->set(self::$key, $keyMin);
        } elseif (array_key_exists($key, $this->styles)) {
            $session->set("flashmessage", "Now using the style '$key'.");
            $session->set(self::$key, $key);
        }

        $url = $session->getOnce("redirect", "style");
        return $response->redirect($url);
    }
public function updateActionGet ( $ style ) : object { $ response = $ this -> di -> get ( "response" ) ; $ session = $ this -> di -> get ( "session" ) ; $ key = $ this -> cssUrl . "/" . $ style . ".css" ; $ keyMin = $ this -> cssUrl . "/" . $ style . ".min.css" ; if ( $ style === "none" ) { $ session -> set ( "flashmessage" , "Unsetting the style and using the default style." ) ; $ session -> set ( self :: $ key , null ) ; } elseif ( array_key_exists ( $ keyMin , $ this -> styles ) ) { $ session -> set ( "flashmessage" , "Now using the style '$keyMin'." ) ; $ session -> set ( self :: $ key , $ keyMin ) ; } elseif ( array_key_exists ( $ key , $ this -> styles ) ) { $ session -> set ( "flashmessage" , "Now using the style '$key'." ) ; $ session -> set ( self :: $ key , $ key ) ; } $ url = $ session -> getOnce ( "redirect" , "style" ) ; return $ response -> redirect ( $ url ) ; }
Update current selected style using a GET url and redirect to last
page visited.

@param string $style the key to the style to use.

@return object
Update current selected style using a GET url and redirect to last page visited .