work on create calendar

This commit is contained in:
2022-05-13 13:49:24 +02:00
parent 7859439f0b
commit 4be3efc619
10 changed files with 128 additions and 44 deletions

View File

@@ -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 "
}
}