bundles/BlockManagerBundle/EventListener/BlockView/GetCollectionPagerListener.php
private function getMaxPages(Block $block): ?int
    {
        if (!$block->getDefinition()->hasPlugin(PagedCollectionsPlugin::class)) {
            return null;
        }

        if ($block->getParameter('paged_collections:enabled')->getValue() !== true) {
            return null;
        }

        return $block->getParameter('paged_collections:max_pages')->getValue();
    }
private function getMaxPages(Block $block): ?int
    {
        if (!$block->getDefinition()->hasPlugin(PagedCollectionsPlugin::class)) {
            return null;
        }

        if ($block->getParameter('paged_collections:enabled')->getValue() !== true) {
            return null;
        }

        return $block->getParameter('paged_collections:max_pages')->getValue();
    }
private function getMaxPages ( Block $ block ) : ? int { if ( ! $ block -> getDefinition ( ) -> hasPlugin ( PagedCollectionsPlugin :: class ) ) { return null ; } if ( $ block -> getParameter ( 'paged_collections:enabled' ) -> getValue ( ) !== true ) { return null ; } return $ block -> getParameter ( 'paged_collections:max_pages' ) -> getValue ( ) ; }
Returns the maximum number of the pages for the provided block,
if paging is enabled and maximum number of pages is set for a block.
Returns the maximum number of the pages for the provided block if paging is enabled and maximum number of pages is set for a block .