Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chamilo-lms/src/CourseBundle/Repository/CGroupRepository.php

34 lines
736 B

<?php
5 years ago
declare(strict_types=1);
/* For licensing terms, see /license.txt */
namespace Chamilo\CourseBundle\Repository;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGroup;
use Doctrine\Persistence\ManagerRegistry;
final class CGroupRepository extends ResourceRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, CGroup::class);
}
public function findOneByCode(string $code): ?CGroup
{
5 years ago
return $this->findOneBy([
'code' => $code,
]);
}
public function findOneByTitle(string $name): ?CGroup
{
5 years ago
return $this->findOneBy([
'name' => $name,
]);
}
}