public function getFilters()
    {
        if ($this->hash === null) {
            throw new \Exception(self::GET_FILTERS_NO_REQUEST_HANDLED_EX_MSG);
        }

        if ($this->sessionFilters === null) {
            $this->sessionFilters = [];
            $session = $this->sessionData;

            $requestQueries = [
                self::REQUEST_QUERY_MASS_ACTION_ALL_KEYS_SELECTED,
                self::REQUEST_QUERY_MASS_ACTION,
                self::REQUEST_QUERY_EXPORT,
                self::REQUEST_QUERY_PAGE,
                self::REQUEST_QUERY_LIMIT,
                self::REQUEST_QUERY_ORDER,
                self::REQUEST_QUERY_TEMPLATE,
                self::REQUEST_QUERY_RESET,
                MassActionColumn::ID,
            ];

            foreach ($requestQueries as $request_query) {
                unset($session[$request_query]);
            }

            foreach ($session as $columnId => $sessionFilter) {
                if (isset($sessionFilter['operator'])) {
                    $operator = $sessionFilter['operator'];
                    unset($sessionFilter['operator']);
                } else {
                    $operator = $this->getColumn($columnId)->getDefaultOperator();
                }

                if (!isset($sessionFilter['to']) && isset($sessionFilter['from'])) {
                    $sessionFilter = $sessionFilter['from'];
                }

                $this->sessionFilters[$columnId] = new Filter($operator, $sessionFilter);
            }
        }

        return $this->sessionFilters;
    }
public function getFilters()
    {
        if ($this->hash === null) {
            throw new \Exception(self::GET_FILTERS_NO_REQUEST_HANDLED_EX_MSG);
        }

        if ($this->sessionFilters === null) {
            $this->sessionFilters = [];
            $session = $this->sessionData;

            $requestQueries = [
                self::REQUEST_QUERY_MASS_ACTION_ALL_KEYS_SELECTED,
                self::REQUEST_QUERY_MASS_ACTION,
                self::REQUEST_QUERY_EXPORT,
                self::REQUEST_QUERY_PAGE,
                self::REQUEST_QUERY_LIMIT,
                self::REQUEST_QUERY_ORDER,
                self::REQUEST_QUERY_TEMPLATE,
                self::REQUEST_QUERY_RESET,
                MassActionColumn::ID,
            ];

            foreach ($requestQueries as $request_query) {
                unset($session[$request_query]);
            }

            foreach ($session as $columnId => $sessionFilter) {
                if (isset($sessionFilter['operator'])) {
                    $operator = $sessionFilter['operator'];
                    unset($sessionFilter['operator']);
                } else {
                    $operator = $this->getColumn($columnId)->getDefaultOperator();
                }

                if (!isset($sessionFilter['to']) && isset($sessionFilter['from'])) {
                    $sessionFilter = $sessionFilter['from'];
                }

                $this->sessionFilters[$columnId] = new Filter($operator, $sessionFilter);
            }
        }

        return $this->sessionFilters;
    }
public function getFilters ( ) { if ( $ this -> hash === null ) { throw new \ Exception ( self :: GET_FILTERS_NO_REQUEST_HANDLED_EX_MSG ) ; } if ( $ this -> sessionFilters === null ) { $ this -> sessionFilters = [ ] ; $ session = $ this -> sessionData ; $ requestQueries = [ self :: REQUEST_QUERY_MASS_ACTION_ALL_KEYS_SELECTED , self :: REQUEST_QUERY_MASS_ACTION , self :: REQUEST_QUERY_EXPORT , self :: REQUEST_QUERY_PAGE , self :: REQUEST_QUERY_LIMIT , self :: REQUEST_QUERY_ORDER , self :: REQUEST_QUERY_TEMPLATE , self :: REQUEST_QUERY_RESET , MassActionColumn :: ID , ] ; foreach ( $ requestQueries as $ request_query ) { unset ( $ session [ $ request_query ] ) ; } foreach ( $ session as $ columnId => $ sessionFilter ) { if ( isset ( $ sessionFilter [ 'operator' ] ) ) { $ operator = $ sessionFilter [ 'operator' ] ; unset ( $ sessionFilter [ 'operator' ] ) ; } else { $ operator = $ this -> getColumn ( $ columnId ) -> getDefaultOperator ( ) ; } if ( ! isset ( $ sessionFilter [ 'to' ] ) && isset ( $ sessionFilter [ 'from' ] ) ) { $ sessionFilter = $ sessionFilter [ 'from' ] ; } $ this -> sessionFilters [ $ columnId ] = new Filter ( $ operator , $ sessionFilter ) ; } } return $ this -> sessionFilters ; }
Returns an array of the active filters of the grid stored in session.

@throws \Exception

@return Filter[]
Returns an array of the active filters of the grid stored in session .