main/core/Repository/GroupRepository.php
public function findGroupByName($name, $executeQuery = true)
    {
        $dql = '
            SELECT g
            FROM Claroline\CoreBundle\Entity\Group g
            WHERE g.name = :name
        ';

        $query = $this->_em->createQuery($dql);
        $query->setParameter('name', $name);

        return $executeQuery ? $query->getOneOrNullResult() : $query;
    }
public function findGroupByName($name, $executeQuery = true)
    {
        $dql = '
            SELECT g
            FROM Claroline\CoreBundle\Entity\Group g
            WHERE g.name = :name
        ';

        $query = $this->_em->createQuery($dql);
        $query->setParameter('name', $name);

        return $executeQuery ? $query->getOneOrNullResult() : $query;
    }
public function findGroupByName ( $ name , $ executeQuery = true ) { $ dql = '
            SELECT g
            FROM Claroline\CoreBundle\Entity\Group g
            WHERE g.name = :name
        ' ; $ query = $ this -> _em -> createQuery ( $ dql ) ; $ query -> setParameter ( 'name' , $ name ) ; return $ executeQuery ? $ query -> getOneOrNullResult ( ) : $ query ; }
Returns a group by its name.

@param string $name
@param bool   $executeQuery

@return Group|null
Returns a group by its name .