Entity/EntityService.php
public function getSorting(Request $request, $ignoreSession = false)
    {
        if ($ignoreSession) {
            return $this->getSortingFromRequest($request);
        }

        $sorting = array_replace(
            $this->getSortingFromSession($request->getSession()),
            $this->getSortingFromRequest($request)
        );

        $this->saveSorting($request->getSession(), $sorting);
        return $sorting;
    }
public function getSorting(Request $request, $ignoreSession = false)
    {
        if ($ignoreSession) {
            return $this->getSortingFromRequest($request);
        }

        $sorting = array_replace(
            $this->getSortingFromSession($request->getSession()),
            $this->getSortingFromRequest($request)
        );

        $this->saveSorting($request->getSession(), $sorting);
        return $sorting;
    }
public function getSorting ( Request $ request , $ ignoreSession = false ) { if ( $ ignoreSession ) { return $ this -> getSortingFromRequest ( $ request ) ; } $ sorting = array_replace ( $ this -> getSortingFromSession ( $ request -> getSession ( ) ) , $ this -> getSortingFromRequest ( $ request ) ) ; $ this -> saveSorting ( $ request -> getSession ( ) , $ sorting ) ; return $ sorting ; }
Returns the current sorting options for the entity.

@param \Symfony\Component\HttpFoundation\Request $request
@param bool $ignoreSession
@return array
Returns the current sorting options for the entity .