mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
105 worflow
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?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\Workflow\Validator;
|
||||
|
||||
/**
|
||||
* Validator which will test that:.
|
||||
*
|
||||
* * a handler exists;
|
||||
* * a related entity does exists;
|
||||
* * a workflow can be associated with this entity.
|
||||
*
|
||||
* @Annotation
|
||||
*/
|
||||
class EntityWorkflowCreation extends \Symfony\Component\Validator\Constraint
|
||||
{
|
||||
public string $messageEntityNotFound = 'Related entity is not found';
|
||||
|
||||
public string $messageHandlerNotFound = 'Handler not found for this entity';
|
||||
|
||||
public string $messageWorkflowNotAvailable = 'Workflow is not valid';
|
||||
|
||||
public function getTargets()
|
||||
{
|
||||
return [self::CLASS_CONSTRAINT];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user