Block/Post/PostList/Toolbar.php
public function setCollection($collection)
    {
        $this->collection = $collection;

        $this->collection->setCurPage($this->getCurrentPage());

        // we need to set pagination only if passed value integer and more that 0
        $limit = (int)$this->getLimit();
        if ($limit) {
            $this->collection->setPageSize($limit);
        }
        if ($this->getCurrentOrder()) {
            $this->collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
        }

        return $this;
    }
public function setCollection($collection)
    {
        $this->collection = $collection;

        $this->collection->setCurPage($this->getCurrentPage());

        // we need to set pagination only if passed value integer and more that 0
        $limit = (int)$this->getLimit();
        if ($limit) {
            $this->collection->setPageSize($limit);
        }
        if ($this->getCurrentOrder()) {
            $this->collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
        }

        return $this;
    }
public function setCollection ( $ collection ) { $ this -> collection = $ collection ; $ this -> collection -> setCurPage ( $ this -> getCurrentPage ( ) ) ; // we need to set pagination only if passed value integer and more that 0 $ limit = ( int ) $ this -> getLimit ( ) ; if ( $ limit ) { $ this -> collection -> setPageSize ( $ limit ) ; } if ( $ this -> getCurrentOrder ( ) ) { $ this -> collection -> setOrder ( $ this -> getCurrentOrder ( ) , $ this -> getCurrentDirection ( ) ) ; } return $ this ; }
Set collection to pager.

@param \Mirasvit\Blog\Model\ResourceModel\Post\Collection $collection
@return $this
Set collection to pager .