private function getAllLanguageCodesFromCreateStruct(
        ContentCreateStruct $contentCreateStruct
    ): array {
        $languageCodes = [$contentCreateStruct->mainLanguageCode];
        foreach ($contentCreateStruct->fields as $field) {
            $languageCodes[] = $field->languageCode;
        }

        return array_unique($languageCodes);
    }
private function getAllLanguageCodesFromCreateStruct(
        ContentCreateStruct $contentCreateStruct
    ): array {
        $languageCodes = [$contentCreateStruct->mainLanguageCode];
        foreach ($contentCreateStruct->fields as $field) {
            $languageCodes[] = $field->languageCode;
        }

        return array_unique($languageCodes);
    }
private function getAllLanguageCodesFromCreateStruct ( ContentCreateStruct $ contentCreateStruct ) : array { $ languageCodes = [ $ contentCreateStruct -> mainLanguageCode ] ; foreach ( $ contentCreateStruct -> fields as $ field ) { $ languageCodes [ ] = $ field -> languageCode ; } return array_unique ( $ languageCodes ) ; }
Get unique list of language codes for all used translations, including mainLanguageCode.

@param \eZ\Publish\API\Repository\Values\Content\ContentCreateStruct $contentCreateStruct

@return string[]
Get unique list of language codes for all used translations including mainLanguageCode .