src/GridFieldConfigurablePaginator.php
protected function getGridPagerState(GridField $gridField = null)
    {
        if (!$this->gridFieldState) {
            $state = $this->getGridField()->State->GridFieldConfigurablePaginator;

            // SS 3.1 compatibility (missing __call)
            if (is_object($state->firstShown)) {
                $state->firstShown = 1;
            }
            if (is_object($state->pageSize)) {
                $state->pageSize = $this->getItemsPerPage();
            }

            // Handle free input in the page number field
            $parentState = $this->getGridField()->State->GridFieldPaginator;
            if (is_object($parentState->currentPage)) {
                $parentState->currentPage = 0;
            }

            if ($parentState->currentPage >= 1) {
                $state->firstShown = ($parentState->currentPage - 1) * $this->getItemsPerPage() + 1;
                $parentState->currentPage = null;
            }

            $this->gridFieldState = $state;
        }

        return $this->gridFieldState;
    }
protected function getGridPagerState(GridField $gridField = null)
    {
        if (!$this->gridFieldState) {
            $state = $this->getGridField()->State->GridFieldConfigurablePaginator;

            // SS 3.1 compatibility (missing __call)
            if (is_object($state->firstShown)) {
                $state->firstShown = 1;
            }
            if (is_object($state->pageSize)) {
                $state->pageSize = $this->getItemsPerPage();
            }

            // Handle free input in the page number field
            $parentState = $this->getGridField()->State->GridFieldPaginator;
            if (is_object($parentState->currentPage)) {
                $parentState->currentPage = 0;
            }

            if ($parentState->currentPage >= 1) {
                $state->firstShown = ($parentState->currentPage - 1) * $this->getItemsPerPage() + 1;
                $parentState->currentPage = null;
            }

            $this->gridFieldState = $state;
        }

        return $this->gridFieldState;
    }
protected function getGridPagerState ( GridField $ gridField = null ) { if ( ! $ this -> gridFieldState ) { $ state = $ this -> getGridField ( ) -> State -> GridFieldConfigurablePaginator ; // SS 3.1 compatibility (missing __call) if ( is_object ( $ state -> firstShown ) ) { $ state -> firstShown = 1 ; } if ( is_object ( $ state -> pageSize ) ) { $ state -> pageSize = $ this -> getItemsPerPage ( ) ; } // Handle free input in the page number field $ parentState = $ this -> getGridField ( ) -> State -> GridFieldPaginator ; if ( is_object ( $ parentState -> currentPage ) ) { $ parentState -> currentPage = 0 ; } if ( $ parentState -> currentPage >= 1 ) { $ state -> firstShown = ( $ parentState -> currentPage - 1 ) * $ this -> getItemsPerPage ( ) + 1 ; $ parentState -> currentPage = null ; } $ this -> gridFieldState = $ state ; } return $ this -> gridFieldState ; }
Gets the state from the current request's GridField and sets some default values on it

@param  GridField $gridField Not used, but present for parent method compatibility
@return GridState_Data
Gets the state from the current request s GridField and sets some default values on it