PHP Класс eZ\Publish\Core\Repository\Values\Content\Content

Наследование: extends eZ\Publish\API\Repository\Values\Content\Content
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$fields An array of array of field values like[$fieldDefIdentifier][$languageCode]
$versionInfo eZ\Publish\API\Repository\Values\Content\VersionInfo

Открытые методы

Метод Описание
__construct ( array $data = [] )
__get ( string $property ) : mixed Magic getter for retrieving convenience properties.
__isset ( string $property ) : boolean Magic isset for signaling existence of convenience properties.
getField ( string $fieldDefIdentifier, string | null $languageCode = null ) : eZ\Publish\API\Repository\Values\Content\Field | null This method returns the field for a given field definition identifier and language.
getFieldValue ( string $fieldDefIdentifier, string $languageCode = null ) : mixed Returns a field value for the given value $version->fields[$fieldDefId][$languageCode] is an equivalent call if no language is given on a translatable field this method returns the value of the initial language of the version if present, otherwise null.
getFields ( ) : eZ\Publish\API\Repository\Values\Content\Field[] This method returns the complete fields collection.
getFieldsByLanguage ( string $languageCode = null ) : eZ\Publish\API\Repository\Values\Content\Field[] This method returns the fields for a given language and non translatable fields.
getVersionInfo ( ) : eZ\Publish\API\Repository\Values\Content\VersionInfo Returns the VersionInfo for this version.

Защищенные методы

Метод Описание
getProperties ( array $dynamicProperties = ['id', 'contentInfo'] ) : array Function where list of properties are returned.

Описание методов

__construct() публичный Метод

public __construct ( array $data = [] )
$data array

__get() публичный Метод

Magic getter for retrieving convenience properties.
public __get ( string $property ) : mixed
$property string The name of the property to retrieve
Результат mixed

__isset() публичный Метод

Magic isset for signaling existence of convenience properties.
public __isset ( string $property ) : boolean
$property string
Результат boolean

getField() публичный Метод

If not set the initialLanguage of the content version is used.
public getField ( string $fieldDefIdentifier, string | null $languageCode = null ) : eZ\Publish\API\Repository\Values\Content\Field | null
$fieldDefIdentifier string
$languageCode string | null
Результат eZ\Publish\API\Repository\Values\Content\Field | null A {@link Field} or null if nothing is found

getFieldValue() публичный Метод

On non translatable fields this method ignores the languageCode parameter.
public getFieldValue ( string $fieldDefIdentifier, string $languageCode = null ) : mixed
$fieldDefIdentifier string
$languageCode string
Результат mixed a primitive type or a field type Value object depending on the field type.

getFields() публичный Метод

This method returns the complete fields collection.
public getFields ( ) : eZ\Publish\API\Repository\Values\Content\Field[]
Результат eZ\Publish\API\Repository\Values\Content\Field[] An array of {@link Field}

getFieldsByLanguage() публичный Метод

If not set the initialLanguage of the content version is used.
public getFieldsByLanguage ( string $languageCode = null ) : eZ\Publish\API\Repository\Values\Content\Field[]
$languageCode string
Результат eZ\Publish\API\Repository\Values\Content\Field[] An array of {@link Field} with field identifier as keys

getProperties() защищенный Метод

Override to add dynamic properties
protected getProperties ( array $dynamicProperties = ['id', 'contentInfo'] ) : array
$dynamicProperties array
Результат array

getVersionInfo() публичный Метод

Returns the VersionInfo for this version.
public getVersionInfo ( ) : eZ\Publish\API\Repository\Values\Content\VersionInfo
Результат eZ\Publish\API\Repository\Values\Content\VersionInfo

Описание свойств

$fields защищенное свойство

An array of array of field values like[$fieldDefIdentifier][$languageCode]
protected $fields

$versionInfo защищенное свойство

protected VersionInfo,eZ\Publish\API\Repository\Values\Content $versionInfo
Результат eZ\Publish\API\Repository\Values\Content\VersionInfo