for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Repository;
use Chamilo\CoreBundle\Entity\Group;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* Class GroupRepository.
*/
class GroupRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
parent::__construct($registry, Group::class);
}
public function getAdmins()
$criteria = ['name' => 'admins'];
$group = $this->findOneBy($criteria);
return $group->getUsers();