PHP Класс eZ\Publish\Core\Persistence\Legacy\Content\TreeHandler

Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$contentGateway Gateway Content gateway.
$contentMapper Mapper Content handler.
$fieldHandler FieldHandler FieldHandler.
$locationGateway eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway Gateway for handling location data.
$locationMapper eZ\Publish\Core\Persistence\Legacy\Content\Location\Mapper Location Mapper.

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

Метод Описание
__construct ( Gateway $locationGateway, Mapper $locationMapper, Gateway $contentGateway, Mapper $contentMapper, FieldHandler $fieldHandler )
changeMainLocation ( mixed $contentId, mixed $locationId ) Changes main location of content identified by given $contentId to location identified by given $locationId.
listVersions ( integer $contentId ) : eZ\Publish\SPI\Persistence\Content\VersionInfo[] Returns the versions for $contentId.
loadContentInfo ( integer | string $contentId ) : eZ\Publish\SPI\Persistence\Content\ContentInfo Returns the metadata object for a content identified by $contentId.
loadLocation ( integer $locationId ) : eZ\Publish\SPI\Persistence\Content\Location Loads the data for the location identified by $locationId.
removeRawContent ( integer $contentId ) Deletes raw content data.
removeSubtree ( mixed $locationId ) : boolean Removes all Locations under and including $locationId.
setSectionForSubtree ( mixed $locationId, mixed $sectionId ) Set section on all content objects in the subtree.

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

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

public __construct ( Gateway $locationGateway, Mapper $locationMapper, Gateway $contentGateway, Mapper $contentMapper, FieldHandler $fieldHandler )
$locationGateway eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway
$locationMapper eZ\Publish\Core\Persistence\Legacy\Content\Location\Mapper
$contentGateway Gateway
$contentMapper Mapper
$fieldHandler FieldHandler

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

Updates ezcontentobject_tree and eznode_assignment tables (eznode_assignment for content current version number).
public changeMainLocation ( mixed $contentId, mixed $locationId )
$contentId mixed
$locationId mixed

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

Result is returned with oldest version first (using version id as it has index and is auto increment).
public listVersions ( integer $contentId ) : eZ\Publish\SPI\Persistence\Content\VersionInfo[]
$contentId integer
Результат eZ\Publish\SPI\Persistence\Content\VersionInfo[]

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

Returns the metadata object for a content identified by $contentId.
public loadContentInfo ( integer | string $contentId ) : eZ\Publish\SPI\Persistence\Content\ContentInfo
$contentId integer | string
Результат eZ\Publish\SPI\Persistence\Content\ContentInfo

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

Loads the data for the location identified by $locationId.
public loadLocation ( integer $locationId ) : eZ\Publish\SPI\Persistence\Content\Location
$locationId integer
Результат eZ\Publish\SPI\Persistence\Content\Location

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

Deletes raw content data.
public removeRawContent ( integer $contentId )
$contentId integer

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

Performs a recursive delete on the location identified by $locationId, including all of its child locations. Content which is not referred to by any other location is automatically removed. Content which looses its main Location will get the first of its other Locations assigned as the new main Location.
public removeSubtree ( mixed $locationId ) : boolean
$locationId mixed
Результат boolean

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

Set section on all content objects in the subtree.
public setSectionForSubtree ( mixed $locationId, mixed $sectionId )
$locationId mixed
$sectionId mixed

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

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

Content gateway.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content $contentGateway
Результат Gateway

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

Content handler.
protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content $contentMapper
Результат Mapper

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

FieldHandler.
protected FieldHandler,eZ\Publish\Core\Persistence\Legacy\Content $fieldHandler
Результат FieldHandler

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

Gateway for handling location data.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content\Location $locationGateway
Результат eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway

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

Location Mapper.
protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content\Location $locationMapper
Результат eZ\Publish\Core\Persistence\Legacy\Content\Location\Mapper