Knp\Bundle\KnpBundlesBundle\Entity\Bundle::getContributors PHP Method

getContributors() public method

Get contributors
public getContributors ( null | integer $page = null, integer $limit = 20 ) : Traversable
$page null | integer
$limit integer
return Traversable
    public function getContributors($page = null, $limit = 20)
    {
        if (null === $page) {
            return $this->contributors;
        }
        $paginator = new Pagerfanta(new DoctrineCollectionAdapter($this->contributors));
        $paginator->setMaxPerPage($limit)->setCurrentPage($page);
        return $paginator->getCurrentPageResults();
    }