src/Forms/GridField/GridFieldPageCount.php
protected function getPaginator($gridField)
    {
        /** @var GridFieldPaginator $paginator */
        $paginator = $gridField->getConfig()->getComponentByType(GridFieldPaginator::class);

        if (!$paginator && GridFieldPageCount::config()->uninherited('require_paginator')) {
            throw new LogicException(
                static::class . " relies on a GridFieldPaginator to be added " . "to the same GridField, but none are present."
            );
        }

        return $paginator;
    }
protected function getPaginator($gridField)
    {
        /** @var GridFieldPaginator $paginator */
        $paginator = $gridField->getConfig()->getComponentByType(GridFieldPaginator::class);

        if (!$paginator && GridFieldPageCount::config()->uninherited('require_paginator')) {
            throw new LogicException(
                static::class . " relies on a GridFieldPaginator to be added " . "to the same GridField, but none are present."
            );
        }

        return $paginator;
    }
protected function getPaginator ( $ gridField ) { /** @var GridFieldPaginator $paginator */ $ paginator = $ gridField -> getConfig ( ) -> getComponentByType ( GridFieldPaginator :: class ) ; if ( ! $ paginator && GridFieldPageCount :: config ( ) -> uninherited ( 'require_paginator' ) ) { throw new LogicException ( static :: class . " relies on a GridFieldPaginator to be added " . "to the same GridField, but none are present." ) ; } return $ paginator ; }
Retrieves an instance of a GridFieldPaginator attached to the same control
@param GridField $gridField The parent gridfield
@return GridFieldPaginator The attached GridFieldPaginator, if found.
@throws LogicException
Retrieves an instance of a GridFieldPaginator attached to the same control