getDeletedSystemTranslationViolations example

PreWriteValidationEvent::class => 'preValidate',
        ];
    }

    public function preValidate(PreWriteValidationEvent $event): void
    {
        if ($event->getContext()->getVersionId() !== Defaults::LIVE_VERSION) {
            return;
        }

        $violations = new ConstraintViolationList();
        $violations->addAll($this->getDeletedSystemTranslationViolations($event->getCommands()));

        if ($violations->count()) {
            $event->getExceptions()->add(new WriteConstraintViolationException($violations));
        }
    }

    /** * @param list<WriteCommand> $writeCommands */
    private function getDeletedSystemTranslationViolations(array $writeCommands): ConstraintViolationList
    {
        
Home | Imprint | This part of the site doesn't use cookies.