public function findAllGroupsBySearch($search)
    {
        $upperSearch = strtoupper(trim($search));

        if ($search !== '') {
            $dql = '
                SELECT g
                FROM Claroline\CoreBundle\Entity\Group g
                WHERE UPPER(g.name) LIKE :search
            ';

            $query = $this->_em->createQuery($dql);
            $query->setParameter('search', "%{$upperSearch}%");

            return $query->getResult();
        }

        return parent::findAll();
    }