private function translateLabels(array $config): array
    {
        foreach ($config as $tagName => $tagConfig) {
            $config[$tagName]['label'] = $this->translator->trans(
                /** @Ignore */
                $tagConfig['label'],
                [],
                $this->translationDomain
            );
            $config[$tagName]['description'] = $this->translator->trans(
                /** @Ignore */
                $tagConfig['description'],
                [],
                $this->translationDomain
            );

            if (empty($tagConfig['attributes'])) {
                continue;
            }

            foreach ($tagConfig['attributes'] as $attributeName => $attributeConfig) {
                $config[$tagName]['attributes'][$attributeName]['label'] = $this->translator->trans(
                    /** @Ignore */
                    $attributeConfig['label'],
                    [],
                    $this->translationDomain
                );
            }
        }

        return $config;
    }
private function translateLabels(array $config): array
    {
        foreach ($config as $tagName => $tagConfig) {
            $config[$tagName]['label'] = $this->translator->trans(
                /** @Ignore */
                $tagConfig['label'],
                [],
                $this->translationDomain
            );
            $config[$tagName]['description'] = $this->translator->trans(
                /** @Ignore */
                $tagConfig['description'],
                [],
                $this->translationDomain
            );

            if (empty($tagConfig['attributes'])) {
                continue;
            }

            foreach ($tagConfig['attributes'] as $attributeName => $attributeConfig) {
                $config[$tagName]['attributes'][$attributeName]['label'] = $this->translator->trans(
                    /** @Ignore */
                    $attributeConfig['label'],
                    [],
                    $this->translationDomain
                );
            }
        }

        return $config;
    }
private function translateLabels ( array $ config ) : array { foreach ( $ config as $ tagName => $ tagConfig ) { $ config [ $ tagName ] [ 'label' ] = $ this -> translator -> trans ( /** @Ignore */ $ tagConfig [ 'label' ] , [ ] , $ this -> translationDomain ) ; $ config [ $ tagName ] [ 'description' ] = $ this -> translator -> trans ( /** @Ignore */ $ tagConfig [ 'description' ] , [ ] , $ this -> translationDomain ) ; if ( empty ( $ tagConfig [ 'attributes' ] ) ) { continue ; } foreach ( $ tagConfig [ 'attributes' ] as $ attributeName => $ attributeConfig ) { $ config [ $ tagName ] [ 'attributes' ] [ $ attributeName ] [ 'label' ] = $ this -> translator -> trans ( /** @Ignore */ $ attributeConfig [ 'label' ] , [ ] , $ this -> translationDomain ) ; } } return $ config ; }
Process Custom Tags config and translate labels for UI.

@param array $config

@return array processed Custom Tags config with translated labels
Process Custom Tags config and translate labels for UI .