public function getField($fieldDefIdentifier, $languageCode = null)
    {
        if (null === $languageCode) {
            $languageCode = $this->versionInfo->contentInfo->mainLanguageCode;
        }

        if (isset($this->fields[$fieldDefIdentifier][$languageCode])) {
            return $this->fields[$fieldDefIdentifier][$languageCode];
        }

        return null;
    }
public function getField($fieldDefIdentifier, $languageCode = null)
    {
        if (null === $languageCode) {
            $languageCode = $this->versionInfo->contentInfo->mainLanguageCode;
        }

        if (isset($this->fields[$fieldDefIdentifier][$languageCode])) {
            return $this->fields[$fieldDefIdentifier][$languageCode];
        }

        return null;
    }
public function getField ( $ fieldDefIdentifier , $ languageCode = null ) { if ( null === $ languageCode ) { $ languageCode = $ this -> versionInfo -> contentInfo -> mainLanguageCode ; } if ( isset ( $ this -> fields [ $ fieldDefIdentifier ] [ $ languageCode ] ) ) { return $ this -> fields [ $ fieldDefIdentifier ] [ $ languageCode ] ; } return null ; }
This method returns the field for a given field definition identifier and language.

If not set the initialLanguage of the content version is used.

@param string $fieldDefIdentifier
@param string|null $languageCode

@return \eZ\Publish\API\Repository\Values\Content\Field|null A {@link Field} or null if nothing is found
This method returns the field for a given field definition identifier and language .