mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 14:54:57 +00:00
work on create calendar
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Chill\MainBundle\Repository;
|
||||
|
||||
use Chill\MainBundle\Entity\Location;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\Query\ResultSetMappingBuilder;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
@@ -37,4 +38,18 @@ class LocationRepository extends ServiceEntityRepository
|
||||
{
|
||||
return $this->findBy(['active' => true, 'availableForUsers' => true]);
|
||||
}
|
||||
|
||||
/**
|
||||
* fetch location by name
|
||||
*
|
||||
* @return array|Location[]
|
||||
*/
|
||||
public function findByName(string $name, string $lang): array
|
||||
{
|
||||
$rsm = new ResultSetMappingBuilder($this->getEntityManager());
|
||||
$rsm->addRootEntityFromClassMetadata(Location::class);
|
||||
|
||||
$sql = "SELECT "
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user