mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 02:53:50 +00:00
Feature: [calendar] allow to create and generate calendar by person
This commit is contained in:
@@ -20,14 +20,32 @@ namespace Chill\CalendarBundle\Repository;
|
||||
|
||||
use Chill\CalendarBundle\Entity\Calendar;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use DateTimeImmutable;
|
||||
|
||||
interface CalendarACLAwareRepositoryInterface
|
||||
{
|
||||
public function countByAccompanyingPeriod(AccompanyingPeriod $period, ?DateTimeImmutable $startDate, ?DateTimeImmutable $endDate): int;
|
||||
|
||||
/**
|
||||
* Return the number or calendars associated with a person. See condition on @see{self::findByPerson}.
|
||||
*/
|
||||
public function countByPerson(Person $person, ?DateTimeImmutable $startDate, ?DateTimeImmutable $endDate): int;
|
||||
|
||||
/**
|
||||
* @return array|Calendar[]
|
||||
*/
|
||||
public function findByAccompanyingPeriod(AccompanyingPeriod $period, ?DateTimeImmutable $startDate, ?DateTimeImmutable $endDate, ?array $orderBy = [], ?int $offset = null, ?int $limit = null): array;
|
||||
|
||||
/**
|
||||
* Return all the calendars which are associated with a person, either on @see{Calendar::person} or within.
|
||||
*
|
||||
* @see{Calendar::persons}. The calendar may be associated with a person, or an accompanyingPeriod.
|
||||
*
|
||||
* The method may assume that the user is allowed to see the person, but must check that the user is allowed
|
||||
* to see the calendar's accompanyingPeriod, if any.
|
||||
*
|
||||
* @return array|Calendar[]
|
||||
*/
|
||||
public function findByPerson(Person $person, ?DateTimeImmutable $startDate, ?DateTimeImmutable $endDate, ?array $orderBy = [], ?int $offset = null, ?int $limit = null): array;
|
||||
}
|
||||
|
Reference in New Issue
Block a user