private function checkHasFields(NodeInterface $node, ClassMetadata $metadata, $locale)
    {
        if ($node->hasProperty($this->prefix.':'.$locale.self::NULLFIELDS)) {
            return true;
        }

        foreach ($metadata->translatableFields as $field) {
            $mapping = $metadata->mappings[$field];
            $propName = $this->getTranslatedPropertyName($locale, $mapping['property']);
            if ($node->hasProperty($propName)) {
                return true;
            }
        }

        return false;
    }
private function checkHasFields(NodeInterface $node, ClassMetadata $metadata, $locale)
    {
        if ($node->hasProperty($this->prefix.':'.$locale.self::NULLFIELDS)) {
            return true;
        }

        foreach ($metadata->translatableFields as $field) {
            $mapping = $metadata->mappings[$field];
            $propName = $this->getTranslatedPropertyName($locale, $mapping['property']);
            if ($node->hasProperty($propName)) {
                return true;
            }
        }

        return false;
    }
private function checkHasFields ( NodeInterface $ node , ClassMetadata $ metadata , $ locale ) { if ( $ node -> hasProperty ( $ this -> prefix . ':' . $ locale . self :: NULLFIELDS ) ) { return true ; } foreach ( $ metadata -> translatableFields as $ field ) { $ mapping = $ metadata -> mappings [ $ field ] ; $ propName = $ this -> getTranslatedPropertyName ( $ locale , $ mapping [ 'property' ] ) ; if ( $ node -> hasProperty ( $ propName ) ) { return true ; } } return false ; }
Helper method to detect if there is any translated field at all, to
not null all fields if the locale does not exist.

@param NodeInterface $node
@param ClassMetadata $metadata
@param string        $locale

@return bool Whether the node has any attribute of the desired locale.
Helper method to detect if there is any translated field at all to not null all fields if the locale does not exist .