mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-02 14:07:43 +00:00
52 lines
1.4 KiB
PHP
52 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/*
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Chill\ActivityBundle\Repository;
|
|
|
|
use Chill\ActivityBundle\Entity\Activity;
|
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
|
use Chill\PersonBundle\Entity\Person;
|
|
use DateTime;
|
|
|
|
interface ActivityACLAwareRepositoryInterface
|
|
{
|
|
/**
|
|
* @return Activity[]|array
|
|
*/
|
|
public function findByAccompanyingPeriod(
|
|
AccompanyingPeriod $period,
|
|
string $role,
|
|
?int $start = 0,
|
|
?DateTime $before = null,
|
|
?DateTime $after = null,
|
|
?array $userJob = [],
|
|
?array $activityTypes = [],
|
|
bool $onlyMe = false,
|
|
?int $limit = 1000,
|
|
?int $offset = 0,
|
|
?array $orderBy = []
|
|
): array;
|
|
|
|
/**
|
|
* Return a list of activities, simplified as array (not object).
|
|
*
|
|
* The aim of this method is to get a long list of activities and keep performance.
|
|
*
|
|
* @return array an array of array, each item representing an activity
|
|
*/
|
|
public function findByAccompanyingPeriodSimplified(AccompanyingPeriod $period, ?int $limit = 1000): array;
|
|
|
|
/**
|
|
* @return Activity[]|array
|
|
*/
|
|
public function findByPerson(Person $person, string $role, ?int $start = 0, ?int $limit = 1000, ?array $orderBy = []): array;
|
|
}
|