eZPublishCommunityProject  2013.9
eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater Class Reference

Class to update content objects to a new type version. More...

Public Member Functions

 __construct (SearchHandler $searchHandler, ContentGateway $contentGateway, Registry $converterRegistry, StorageHandler $storageHandler)
 Creates a new content updater. More...
 
 applyUpdates ($contentTypeId, array $actions)
 Applies all given updates. More...
 
 determineActions (Type $fromType, Type $toType)
 Determines the necessary update actions. More...
 

Protected Member Functions

 hasFieldDefinition (Type $type, FieldDefinition $fieldDef)
 hasFieldDefinition More...
 
 loadContentObjects ($contentTypeId)
 Returns all content objects of $contentTypeId. More...
 

Protected Attributes

 $contentGateway
 
 $converterRegistry
 
 $searchHandler
 
 $storageHandler
 

Detailed Description

Class to update content objects to a new type version.

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater::__construct ( SearchHandler  $searchHandler,
ContentGateway  $contentGateway,
Registry  $converterRegistry,
StorageHandler  $storageHandler 
)

Creates a new content updater.

Parameters
\eZ\Publish\SPI\Persistence\Content\Search\Handler$searchHandler
\eZ\Publish\Core\Persistence\Legacy\Content\Gateway$contentGateway
\eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry$converterRegistry
\eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler$storageHandler

Member Function Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater::applyUpdates (   $contentTypeId,
array  $actions 
)

Applies all given updates.

Parameters
mixed$contentTypeId
\eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action[]$actions
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater::determineActions ( Type  $fromType,
Type  $toType 
)

Determines the necessary update actions.

Parameters
\eZ\Publish\SPI\Persistence\Content\Type$fromType
\eZ\Publish\SPI\Persistence\Content\Type$toType
Returns
[]
eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater::hasFieldDefinition ( Type  $type,
FieldDefinition  $fieldDef 
)
protected

hasFieldDefinition

Parameters
\eZ\Publish\SPI\Persistence\Content\Type$type
\eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition$fieldDef
Returns
boolean

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\determineActions().

eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater::loadContentObjects (   $contentTypeId)
protected

Returns all content objects of $contentTypeId.

Parameters
mixed$contentTypeId
Returns
[]

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\applyUpdates().

Member Data Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater::$contentGateway
protected
eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater::$converterRegistry
protected
eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater::$searchHandler
protected
eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater::$storageHandler
protected

The documentation for this class was generated from the following file: