public function findAllUserRoles($executeQuery = true)
    {
        $dql = '
            SELECT r
            FROM Claroline\CoreBundle\Entity\Role r
            WHERE r.type = :type
        ';

        $query = $this->_em->createQuery($dql);
        $query->setParameter('type', Role::USER_ROLE);

        return $executeQuery ? $query->getResult() : $query;
    }
public function findAllUserRoles($executeQuery = true)
    {
        $dql = '
            SELECT r
            FROM Claroline\CoreBundle\Entity\Role r
            WHERE r.type = :type
        ';

        $query = $this->_em->createQuery($dql);
        $query->setParameter('type', Role::USER_ROLE);

        return $executeQuery ? $query->getResult() : $query;
    }
public function findAllUserRoles ( $ executeQuery = true ) { $ dql = '
            SELECT r
            FROM Claroline\CoreBundle\Entity\Role r
            WHERE r.type = :type
        ' ; $ query = $ this -> _em -> createQuery ( $ dql ) ; $ query -> setParameter ( 'type' , Role :: USER_ROLE ) ; return $ executeQuery ? $ query -> getResult ( ) : $ query ; }
Returns all user-type roles.

@param bool $executeQuery

@return array[Role]|query
Returns all user - type roles .