duplicateReferences example

/** * @param string[] $entityFields * @param string[] $referencedFields */
    private function checkReferences(
        array $entityFields,
        array $referencedFields,
        string $customEntityName,
        string $xmlElement
    ): void {
        if (\count($referencedFields) !== \count(\array_unique($referencedFields))) {
            throw CustomEntityConfigurationException::duplicateReferences(
                AdminUiXmlSchema::FILENAME,
                $customEntityName,
                $xmlElement,
                $this->getDuplicates($referencedFields)
            );
        }

        $invalidFields = array_diff($referencedFields$entityFields);
        if (!empty($invalidFields)) {
            throw CustomEntityConfigurationException::invalidReferences(
                AdminUiXmlSchema::FILENAME,
                
Home | Imprint | This part of the site doesn't use cookies.