src/PHPDish/Bundle/CoreBundle/Search/Algolia/AlgoliaSearch.php
protected function createPagerfanta($keyword, $entity, $options)
    {
        $page = $options['page'] ?? 1;
        $length = $options['length'] ?? 10;
        unset($options['page']);
        unset($options['length']);

//        dump($page);
//        dump($length);exit;
        $adapter = new AlgoliaAdapter($keyword, $entity, $this->entityManager, $this->indexer, $options);
        $pagerfanta  = new Pagerfanta($adapter);
        $pagerfanta->setMaxPerPage($length)
            ->setCurrentPage($page);
        return $pagerfanta;
    }
protected function createPagerfanta($keyword, $entity, $options)
    {
        $page = $options['page'] ?? 1;
        $length = $options['length'] ?? 10;
        unset($options['page']);
        unset($options['length']);

//        dump($page);
//        dump($length);exit;
        $adapter = new AlgoliaAdapter($keyword, $entity, $this->entityManager, $this->indexer, $options);
        $pagerfanta  = new Pagerfanta($adapter);
        $pagerfanta->setMaxPerPage($length)
            ->setCurrentPage($page);
        return $pagerfanta;
    }
创建分页

@param string $keyword
@param string $entity
@param array $options
@return Pagerfanta