public function addPrevPage(Result $result): ? string
    {
        $query = $result->getQuery();
        $urlParameters = $this->generateQueryUrlParameters($result);
        $page = $query->getPage();
        $prevPage = $page - 1;

        if ($prevPage < 1) {
            return null;
        }

        $urlParameters['page'] = $prevPage;

        return $this->createUrlByUrlParameters(
            $result,
            $urlParameters
        )['route'];
    }
public function addPrevPage(Result $result): ? string
    {
        $query = $result->getQuery();
        $urlParameters = $this->generateQueryUrlParameters($result);
        $page = $query->getPage();
        $prevPage = $page - 1;

        if ($prevPage < 1) {
            return null;
        }

        $urlParameters['page'] = $prevPage;

        return $this->createUrlByUrlParameters(
            $result,
            $urlParameters
        )['route'];
    }
public function addPrevPage ( Result $ result ) : ? string { $ query = $ result -> getQuery ( ) ; $ urlParameters = $ this -> generateQueryUrlParameters ( $ result ) ; $ page = $ query -> getPage ( ) ; $ prevPage = $ page - 1 ; if ( $ prevPage < 1 ) { return null ; } $ urlParameters [ 'page' ] = $ prevPage ; return $ this -> createUrlByUrlParameters ( $ result , $ urlParameters ) [ 'route' ] ; }
Add previous page.

@param Result $result

@return string|null
Add previous page .