convertToCamelCase example


    private function guessKeyFromMappedKey(array $keyLookupTable, string $mappedKey, EntityDefinition $definition, int $depthLimit = 5): string
    {
        if ($depthLimit < 1) {
            return '';
        }

        if (!empty($keyLookupTable[$mappedKey])) {
            return $keyLookupTable[$mappedKey];
        }

        $camelCaseMappedKey = $this->convertToCamelCase($mappedKey);

        // check direct match of translated field         $translationDefinition = $definition->getTranslationDefinition();
        if ($translationDefinition !== null) {
            $translatedFieldExactMatch = $translationDefinition->getField($camelCaseMappedKey);
            if (
                $translatedFieldExactMatch !== null
                && !($translatedFieldExactMatch instanceof FkField)
                && !($translatedFieldExactMatch instanceof IdField)
            ) {
                return 'translations.DEFAULT.' . $translatedFieldExactMatch->getPropertyName();
            }
Home | Imprint | This part of the site doesn't use cookies.