protected function setViewMode($viewMode)
    {
        if (!in_array($viewMode, [
            self::VIEW_MODE_GRID,
            self::VIEW_MODE_LIST,
            self::VIEW_MODE_TILES
        ])) {
            throw new ApplicationException('Invalid input data');
        }

        $this->putSession('view_mode', $viewMode);
    }
protected function setViewMode($viewMode)
    {
        if (!in_array($viewMode, [
            self::VIEW_MODE_GRID,
            self::VIEW_MODE_LIST,
            self::VIEW_MODE_TILES
        ])) {
            throw new ApplicationException('Invalid input data');
        }

        $this->putSession('view_mode', $viewMode);
    }
protected function setViewMode ( $ viewMode ) { if ( ! in_array ( $ viewMode , [ self :: VIEW_MODE_GRID , self :: VIEW_MODE_LIST , self :: VIEW_MODE_TILES ] ) ) { throw new ApplicationException ( 'Invalid input data' ) ; } $ this -> putSession ( 'view_mode' , $ viewMode ) ; }
Stores a view mode in the session
@param string $viewMode
@return void
Stores a view mode in the session