public function __construct(ItemList $itemList)
 {
     $itemList->getQueryObject()->setMaxResults($this->maxResultsToProcessAtOnce);
     $results = $itemList->getResults();
     $adapter = new ArrayAdapter($results);
     $this->list = $itemList;
     return Pagerfanta::__construct($adapter);
 }
Exemple #2
0
 public function __construct(AbstractItemList $itemList, AdapterInterface $adapter)
 {
     $this->list = $itemList;
     return parent::__construct($adapter);
 }
Exemple #3
0
 /**
  * Constructor
  *
  * @param mixed   $items
  * @param integer $page
  * @param integer $limit
  */
 public function __construct($items, $limit = 25, $page = 1)
 {
     parent::__construct($this->createAdapterFromInstance($items));
     $this->setMaxPerPage($limit);
     $this->setCurrentPage($page);
 }
Exemple #4
0
 /**
  * {@inheritdoc}
  */
 public function __construct(AdapterInterface $adapter, Builder $builder)
 {
     parent::__construct($adapter);
     $this->builder = $builder;
 }