mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Updated interfaces to include explicit return types for improved type safety and readability. Integrated support for Symfony's TranslatableInterface in relevant methods to enhance translation handling.
36 lines
1.0 KiB
PHP
36 lines
1.0 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\MainBundle\Export;
|
|
|
|
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
|
|
|
/**
|
|
* Add a validation method to validate data collected by Export Element.
|
|
*
|
|
* Implements this interface on other `ExportElementInterface` to validate
|
|
* the form submitted by users.
|
|
*
|
|
* **note**: When this interface is implemented on filters or aggregators,
|
|
* the form is validated **only** if the filter/aggregator is `enabled` by the
|
|
* user.
|
|
*
|
|
* @see http://symfony.com/doc/current/validation/custom_constraint.html#class-constraint-validator Example of building violations
|
|
*/
|
|
interface ExportElementValidatedInterface
|
|
{
|
|
/**
|
|
* validate the form's data and, if required, build a contraint
|
|
* violation on the data.
|
|
*/
|
|
public function validateForm(mixed $data, ExecutionContextInterface $context): void;
|
|
}
|