public function paginate($page = 1, $perPage = null)
    {
        $perPage = $perPage ?: $this->getMaxResults();
        $qb      = $this->createQueryBuilder();

        $qb->paginate($page, $perPage);

        return $this->getPaginator($qb);
    }