PHP Class eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater

Show file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$contentGateway eZ\Publish\Core\Persistence\Legacy\Content\Gateway Content gateway.
$contentMapper eZ\Publish\Core\Persistence\Legacy\Content\Mapper
$converterRegistry eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry FieldValue converter registry.
$storageHandler eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler Storage handler.

Public Methods

Method Description
__construct ( Gateway $contentGateway, ConverterRegistry $converterRegistry, StorageHandler $storageHandler, Mapper $contentMapper ) Creates a new content updater.
applyUpdates ( mixed $contentTypeId, array $actions ) Applies all given updates.
determineActions ( eZ\Publish\SPI\Persistence\Content\Type $fromType, eZ\Publish\SPI\Persistence\Content\Type $toType ) : Action[] Determines the necessary update actions.

Protected Methods

Method Description
getContentIdsByContentTypeId ( mixed $contentTypeId ) : int[] Returns all content objects of $contentTypeId.
hasFieldDefinition ( eZ\Publish\SPI\Persistence\Content\Type $type, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef ) : boolean hasFieldDefinition.

Method Details

__construct() public method

Creates a new content updater.
public __construct ( Gateway $contentGateway, ConverterRegistry $converterRegistry, StorageHandler $storageHandler, Mapper $contentMapper )
$contentGateway eZ\Publish\Core\Persistence\Legacy\Content\Gateway
$converterRegistry eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry
$storageHandler eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler
$contentMapper eZ\Publish\Core\Persistence\Legacy\Content\Mapper

applyUpdates() public method

Applies all given updates.
public applyUpdates ( mixed $contentTypeId, array $actions )
$contentTypeId mixed
$actions array

determineActions() public method

Determines the necessary update actions.
public determineActions ( eZ\Publish\SPI\Persistence\Content\Type $fromType, eZ\Publish\SPI\Persistence\Content\Type $toType ) : Action[]
$fromType eZ\Publish\SPI\Persistence\Content\Type
$toType eZ\Publish\SPI\Persistence\Content\Type
return eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action[]

getContentIdsByContentTypeId() protected method

Returns all content objects of $contentTypeId.
protected getContentIdsByContentTypeId ( mixed $contentTypeId ) : int[]
$contentTypeId mixed
return int[]

hasFieldDefinition() protected method

hasFieldDefinition.
protected hasFieldDefinition ( eZ\Publish\SPI\Persistence\Content\Type $type, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef ) : boolean
$type eZ\Publish\SPI\Persistence\Content\Type
$fieldDef eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
return boolean

Property Details

$contentGateway protected property

Content gateway.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content $contentGateway
return eZ\Publish\Core\Persistence\Legacy\Content\Gateway

$contentMapper protected property

protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content $contentMapper
return eZ\Publish\Core\Persistence\Legacy\Content\Mapper

$converterRegistry protected property

FieldValue converter registry.
protected ConverterRegistry,eZ\Publish\Core\Persistence\Legacy\Content\FieldValue $converterRegistry
return eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry

$storageHandler protected property

Storage handler.
protected StorageHandler,eZ\Publish\Core\Persistence\Legacy\Content $storageHandler
return eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler