mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-17 07:44:24 +00:00
49 lines
1.3 KiB
PHP
49 lines
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* 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.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Chill\MainBundle\Export;
|
|
|
|
use Doctrine\ORM\QueryBuilder;
|
|
|
|
/**
|
|
* Modifiers modify the export's query.
|
|
*
|
|
* Known subclasses : AggregatorInterface and FilterInterface
|
|
*/
|
|
interface ModifierInterface extends ExportElementInterface
|
|
{
|
|
/**
|
|
* The role required for executing this Modifier.
|
|
*
|
|
* If null, will used the ExportInterface::requiredRole role from
|
|
* the current executing export.
|
|
*
|
|
* @return \Symfony\Component\Security\Core\Role\Role|null A role required to execute this ModifiersInterface
|
|
*/
|
|
public function addRole();
|
|
|
|
/**
|
|
* Alter the query initiated by the export, to add the required statements
|
|
* (`GROUP BY`, `SELECT`, `WHERE`).
|
|
*
|
|
* @param QueryBuilder $qb the QueryBuilder initiated by the Export (and eventually modified by other Modifiers)
|
|
* @param mixed[] $data the data from the Form (builded by buildForm)
|
|
*/
|
|
public function alterQuery(QueryBuilder $qb, $data);
|
|
|
|
/**
|
|
* On which type of Export this ModifiersInterface may apply.
|
|
*
|
|
* @return string the type on which the Modifiers apply
|
|
*/
|
|
public function applyOn();
|
|
}
|