PHP 클래스 eZ\Publish\Core\Persistence\Legacy\Content\FieldHandler

파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$contentGateway Gateway Content Gateway.
$fieldTypeRegistry eZ\Publish\Core\Persistence\FieldTypeRegistry FieldType registry.
$fieldTypes array Hash of SPI FieldTypes or callable callbacks to generate one.
$languageHandler eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler
$mapper Mapper Content Mapper.
$storageHandler StorageHandler Storage Handler.

공개 메소드들

메소드 설명
__construct ( Gateway $contentGateway, Mapper $mapper, StorageHandler $storageHandler, eZ\Publish\SPI\Persistence\Content\Language\Handler $languageHandler, FieldTypeRegistry $fieldTypeRegistry ) Creates a new Field Handler.
createExistingFieldsInNewVersion ( eZ\Publish\SPI\Persistence\Content $content ) Creates existing fields in a new version for $content.
createNewFields ( eZ\Publish\SPI\Persistence\Content $content, eZ\Publish\SPI\Persistence\Content\Type $contentType ) Creates new fields in the database from $content of $contentType.
deleteFields ( integer $contentId, eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo ) Deletes the fields for $contentId in $versionInfo from the database.
loadExternalFieldData ( eZ\Publish\SPI\Persistence\Content $content ) Performs external loads for the fields in $content.
updateFields ( eZ\Publish\SPI\Persistence\Content $content, eZ\Publish\SPI\Persistence\Content\UpdateStruct $updateStruct, eZ\Publish\SPI\Persistence\Content\Type $contentType ) Updates the fields in for content identified by $contentId and $versionNo in the database in respect to $updateStruct.

보호된 메소드들

메소드 설명
copyField ( eZ\Publish\SPI\Persistence\Content\Field $originalField, string $languageCode, eZ\Publish\SPI\Persistence\Content $content ) Copies existing field to new field for given $languageCode.
copyFields ( array $fields, eZ\Publish\SPI\Persistence\Content $content )
createExistingFieldInNewVersion ( eZ\Publish\SPI\Persistence\Content\Field $field, eZ\Publish\SPI\Persistence\Content $content ) Creates an existing field in a new version, no new ID is generated.
createNewField ( eZ\Publish\SPI\Persistence\Content\Field $field, eZ\Publish\SPI\Persistence\Content $content ) Creates a new field in the database.
getEmptyField ( eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition, string $languageCode ) : eZ\Publish\SPI\Persistence\Content\Field Returns empty Field object for given field definition and language code.
getFieldMap ( array $fields, array &$languageCodes = null ) : eZ\Publish\SPI\Persistence\Content\Field[][] Returns given $fields structured in hash array with field definition ids and language codes as keys.
getLanguageCodes ( array $languageIds ) : array For given $languageIds returns array with language codes as keys.
updateCopiedField ( eZ\Publish\SPI\Persistence\Content\Field $field, eZ\Publish\SPI\Persistence\Content\Field $updateField, eZ\Publish\SPI\Persistence\Content\Field $originalField, eZ\Publish\SPI\Persistence\Content $content ) Updates a language copy of a non-translatable field.
updateField ( eZ\Publish\SPI\Persistence\Content\Field $field, eZ\Publish\SPI\Persistence\Content $content ) Updates an existing field in the database.

메소드 상세

__construct() 공개 메소드

Creates a new Field Handler.
public __construct ( Gateway $contentGateway, Mapper $mapper, StorageHandler $storageHandler, eZ\Publish\SPI\Persistence\Content\Language\Handler $languageHandler, FieldTypeRegistry $fieldTypeRegistry )
$contentGateway Gateway
$mapper Mapper
$storageHandler StorageHandler
$languageHandler eZ\Publish\SPI\Persistence\Content\Language\Handler
$fieldTypeRegistry eZ\Publish\Core\Persistence\FieldTypeRegistry

copyField() 보호된 메소드

Used by self::createNewFields() and self::updateFields()
protected copyField ( eZ\Publish\SPI\Persistence\Content\Field $originalField, string $languageCode, eZ\Publish\SPI\Persistence\Content $content )
$originalField eZ\Publish\SPI\Persistence\Content\Field
$languageCode string
$content eZ\Publish\SPI\Persistence\Content

copyFields() 보호된 메소드

protected copyFields ( array $fields, eZ\Publish\SPI\Persistence\Content $content )
$fields array
$content eZ\Publish\SPI\Persistence\Content

createExistingFieldInNewVersion() 보호된 메소드

Used to insert a field with an existing ID but a new version number. $content is used for new version data, needed by Content gateway and external storage. External data is being copied here as some FieldTypes require original field external data. By default copying falls back to storing, it is upon external storage implementation to override the behaviour as needed.
protected createExistingFieldInNewVersion ( eZ\Publish\SPI\Persistence\Content\Field $field, eZ\Publish\SPI\Persistence\Content $content )
$field eZ\Publish\SPI\Persistence\Content\Field
$content eZ\Publish\SPI\Persistence\Content

createExistingFieldsInNewVersion() 공개 메소드

Creates existing fields in a new version for $content.
public createExistingFieldsInNewVersion ( eZ\Publish\SPI\Persistence\Content $content )
$content eZ\Publish\SPI\Persistence\Content

createNewField() 보호된 메소드

Used by self::createNewFields() and self::updateFields()
protected createNewField ( eZ\Publish\SPI\Persistence\Content\Field $field, eZ\Publish\SPI\Persistence\Content $content )
$field eZ\Publish\SPI\Persistence\Content\Field
$content eZ\Publish\SPI\Persistence\Content

createNewFields() 공개 메소드

Creates new fields in the database from $content of $contentType.
public createNewFields ( eZ\Publish\SPI\Persistence\Content $content, eZ\Publish\SPI\Persistence\Content\Type $contentType )
$content eZ\Publish\SPI\Persistence\Content
$contentType eZ\Publish\SPI\Persistence\Content\Type

deleteFields() 공개 메소드

Deletes the fields for $contentId in $versionInfo from the database.
public deleteFields ( integer $contentId, eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo )
$contentId integer
$versionInfo eZ\Publish\SPI\Persistence\Content\VersionInfo

getEmptyField() 보호된 메소드

Uses FieldType to create empty field value.
protected getEmptyField ( eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition, string $languageCode ) : eZ\Publish\SPI\Persistence\Content\Field
$fieldDefinition eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
$languageCode string
리턴 eZ\Publish\SPI\Persistence\Content\Field

getFieldMap() 보호된 메소드

Returns given $fields structured in hash array with field definition ids and language codes as keys.
protected getFieldMap ( array $fields, array &$languageCodes = null ) : eZ\Publish\SPI\Persistence\Content\Field[][]
$fields array
$languageCodes array
리턴 eZ\Publish\SPI\Persistence\Content\Field[][]

getLanguageCodes() 보호된 메소드

For given $languageIds returns array with language codes as keys.
protected getLanguageCodes ( array $languageIds ) : array
$languageIds array
리턴 array

loadExternalFieldData() 공개 메소드

Performs external loads for the fields in $content.
public loadExternalFieldData ( eZ\Publish\SPI\Persistence\Content $content )
$content eZ\Publish\SPI\Persistence\Content

updateCopiedField() 보호된 메소드

External data is being copied here as some FieldTypes require original field external data. By default copying falls back to storing, it is upon external storage implementation to override the behaviour as needed.
protected updateCopiedField ( eZ\Publish\SPI\Persistence\Content\Field $field, eZ\Publish\SPI\Persistence\Content\Field $updateField, eZ\Publish\SPI\Persistence\Content\Field $originalField, eZ\Publish\SPI\Persistence\Content $content )
$field eZ\Publish\SPI\Persistence\Content\Field
$updateField eZ\Publish\SPI\Persistence\Content\Field
$originalField eZ\Publish\SPI\Persistence\Content\Field
$content eZ\Publish\SPI\Persistence\Content

updateField() 보호된 메소드

Used by self::createNewFields() and self::updateFields()
protected updateField ( eZ\Publish\SPI\Persistence\Content\Field $field, eZ\Publish\SPI\Persistence\Content $content )
$field eZ\Publish\SPI\Persistence\Content\Field
$content eZ\Publish\SPI\Persistence\Content

updateFields() 공개 메소드

Updates the fields in for content identified by $contentId and $versionNo in the database in respect to $updateStruct.
public updateFields ( eZ\Publish\SPI\Persistence\Content $content, eZ\Publish\SPI\Persistence\Content\UpdateStruct $updateStruct, eZ\Publish\SPI\Persistence\Content\Type $contentType )
$content eZ\Publish\SPI\Persistence\Content
$updateStruct eZ\Publish\SPI\Persistence\Content\UpdateStruct
$contentType eZ\Publish\SPI\Persistence\Content\Type

프로퍼티 상세

$contentGateway 보호되어 있는 프로퍼티

Content Gateway.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content $contentGateway
리턴 Gateway

$fieldTypeRegistry 보호되어 있는 프로퍼티

FieldType registry.
protected FieldTypeRegistry,eZ\Publish\Core\Persistence $fieldTypeRegistry
리턴 eZ\Publish\Core\Persistence\FieldTypeRegistry

$fieldTypes 보호되어 있는 프로퍼티

Hash of SPI FieldTypes or callable callbacks to generate one.
protected array $fieldTypes
리턴 array

$languageHandler 보호되어 있는 프로퍼티

protected Handler,eZ\Publish\Core\Persistence\Legacy\Content\Language $languageHandler
리턴 eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler

$mapper 보호되어 있는 프로퍼티

Content Mapper.
protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content $mapper
리턴 Mapper

$storageHandler 보호되어 있는 프로퍼티

Storage Handler.
protected StorageHandler,eZ\Publish\Core\Persistence\Legacy\Content $storageHandler
리턴 StorageHandler