File: /var/www/dvpis2025/dvpis.kaunokolegija.lt/src/Repository/DepartmentRepository.php
<?php
namespace App\Repository;
use Doctrine\ORM\EntityRepository;
/**
* DepartmentRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class DepartmentRepository extends EntityRepository
{
public function getAllDepartmentsByShortName()
{
return $this->getEntityManager()
->createQuery(
"SELECT d
FROM App:Department d INDEX BY d.shortName
ORDER BY d.shortName ASC"
)
->getResult();
}
public function getAllByShortName()
{
return $this->getAllDepartmentsByShortName();
}
}