24 lines
583 B
PHP
24 lines
583 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace MauticPlugin\PlanBundle\Validator\Constraints;
|
|
|
|
use Symfony\Component\Validator\Constraint;
|
|
|
|
/**
|
|
* Class constraint on Task: the parent task must be in the same plan, and must not be the task itself
|
|
* or one of its sub-tasks (which would create a loop).
|
|
*/
|
|
class ValidTaskParent extends Constraint
|
|
{
|
|
public string $otherPlanMessage = 'mautic.plan.task.parent.other_plan';
|
|
|
|
public string $loopMessage = 'mautic.plan.task.parent.loop';
|
|
|
|
public function getTargets(): string
|
|
{
|
|
return self::CLASS_CONSTRAINT;
|
|
}
|
|
}
|