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

Наследование: implements eZ\Publish\SPI\Persistence\Content\Type\Handler
Показать файл Открыть проект

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

Свойство Тип Описание
$contentTypeGateway Gateway
$mapper Mapper Mapper for Type objects.
$updateHandler eZ\Publish\Core\Persistence\Legacy\Content\Type\Update\Handler Content Type update handler.

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

Метод Описание
__construct ( Gateway $contentTypeGateway, Mapper $mapper, Handler $updateHandler ) Creates a new content type handler.
addFieldDefinition ( mixed $contentTypeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition ) Adds a new field definition to an existing Type.
copy ( mixed $userId, mixed $contentTypeId, integer $status ) : eZ\Publish\SPI\Persistence\Content\Type
create ( eZ\Publish\SPI\Persistence\Content\Type\CreateStruct $createStruct ) : eZ\Publish\SPI\Persistence\Content\Type
createDraft ( mixed $modifierId, mixed $contentTypeId ) : eZ\Publish\SPI\Persistence\Content\Type Creates a draft of existing defined content type.
createGroup ( eZ\Publish\SPI\Persistence\Content\Type\Group\CreateStruct $createStruct ) : eZ\Publish\SPI\Persistence\Content\Type\Group
delete ( mixed $contentTypeId, integer $status ) : boolean
deleteGroup ( mixed $groupId )
getContentCount ( mixed $contentTypeId ) : integer Counts the number of Content instances of the ContentType identified by given $contentTypeId.
getFieldDefinition ( mixed $id, integer $status ) : eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition Returns field definition for the given field definition id.
getSearchableFieldMap ( )
link ( mixed $groupId, mixed $contentTypeId, $status ) Link a content type group with a content type.
load ( integer $contentTypeId, integer $status = Type::STATUS_DEFINED ) : eZ\Publish\SPI\Persistence\Content\Type Loads a content type by id and status.
loadAllGroups ( ) : eZ\Publish\SPI\Persistence\Content\Type\Group[]
loadByIdentifier ( string $identifier ) : eZ\Publish\SPI\Persistence\Content\Type Loads a (defined) content type by identifier.
loadByRemoteId ( mixed $remoteId ) : eZ\Publish\SPI\Persistence\Content\Type Loads a (defined) content type by remote id.
loadContentTypes ( mixed $groupId, integer $status ) : eZ\Publish\SPI\Persistence\Content\Type[]
loadGroup ( mixed $groupId ) : eZ\Publish\SPI\Persistence\Content\Type\Group
loadGroupByIdentifier ( string $identifier ) : eZ\Publish\SPI\Persistence\Content\Type\Group
publish ( mixed $contentTypeId ) Update content objects.
removeFieldDefinition ( mixed $contentTypeId, $status, mixed $fieldDefinitionId ) : boolean Removes a field definition from an existing Type.
unlink ( mixed $groupId, mixed $contentTypeId, integer $status ) Unlink a content type group from a content type.
update ( mixed $typeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct $contentType ) : eZ\Publish\SPI\Persistence\Content\Type
updateFieldDefinition ( mixed $contentTypeId, $status, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition ) This method updates the given $fieldDefinition on a Type.
updateGroup ( eZ\Publish\SPI\Persistence\Content\Type\Group\UpdateStruct $struct ) : eZ\Publish\SPI\Persistence\Content\Type\Group

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

Метод Описание
internalCreate ( eZ\Publish\SPI\Persistence\Content\Type\CreateStruct $createStruct, mixed | null $contentTypeId = null ) : eZ\Publish\SPI\Persistence\Content\Type Internal method for creating ContentType.
loadFromRows ( array $rows, mixed $typeIdentifier, integer $status ) : eZ\Publish\SPI\Persistence\Content\Type Loads a single Type from $rows.

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

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

Creates a new content type handler.
public __construct ( Gateway $contentTypeGateway, Mapper $mapper, Handler $updateHandler )
$contentTypeGateway Gateway
$mapper Mapper
$updateHandler eZ\Publish\Core\Persistence\Legacy\Content\Type\Update\Handler

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

This method creates a new status of the Type with the $fieldDefinition added. It does not update existing content objects depending on the field (default) values.
public addFieldDefinition ( mixed $contentTypeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition )
$contentTypeId mixed
$status integer One of Type::STATUS_DEFINED|Type::STATUS_DRAFT|Type::STATUS_MODIFIED
$fieldDefinition eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition

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

public copy ( mixed $userId, mixed $contentTypeId, integer $status ) : eZ\Publish\SPI\Persistence\Content\Type
$userId mixed
$contentTypeId mixed
$status integer One of Type::STATUS_DEFINED|Type::STATUS_DRAFT|Type::STATUS_MODIFIED
Результат eZ\Publish\SPI\Persistence\Content\Type

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

public create ( eZ\Publish\SPI\Persistence\Content\Type\CreateStruct $createStruct ) : eZ\Publish\SPI\Persistence\Content\Type
$createStruct eZ\Publish\SPI\Persistence\Content\Type\CreateStruct
Результат eZ\Publish\SPI\Persistence\Content\Type

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

Updates modified date, sets $modifierId and status to Type::STATUS_DRAFT on the new returned draft.
public createDraft ( mixed $modifierId, mixed $contentTypeId ) : eZ\Publish\SPI\Persistence\Content\Type
$modifierId mixed
$contentTypeId mixed
Результат eZ\Publish\SPI\Persistence\Content\Type

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

public createGroup ( eZ\Publish\SPI\Persistence\Content\Type\Group\CreateStruct $createStruct ) : eZ\Publish\SPI\Persistence\Content\Type\Group
$createStruct eZ\Publish\SPI\Persistence\Content\Type\Group\CreateStruct
Результат eZ\Publish\SPI\Persistence\Content\Type\Group

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

public delete ( mixed $contentTypeId, integer $status ) : boolean
$contentTypeId mixed
$status integer
Результат boolean

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

public deleteGroup ( mixed $groupId )
$groupId mixed

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

Counts the number of Content instances of the ContentType identified by given $contentTypeId.
public getContentCount ( mixed $contentTypeId ) : integer
$contentTypeId mixed
Результат integer

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

Returns field definition for the given field definition id.
public getFieldDefinition ( mixed $id, integer $status ) : eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
$id mixed
$status integer One of Type::STATUS_DEFINED|Type::STATUS_DRAFT|Type::STATUS_MODIFIED
Результат eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition

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

См. также: eZ\Publish\SPI\Persistence\Content\Type\Handler::getSearchableFieldMap

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

Used by self::create(), self::createDraft() and self::copy()
protected internalCreate ( eZ\Publish\SPI\Persistence\Content\Type\CreateStruct $createStruct, mixed | null $contentTypeId = null ) : eZ\Publish\SPI\Persistence\Content\Type
$createStruct eZ\Publish\SPI\Persistence\Content\Type\CreateStruct
$contentTypeId mixed | null Used by self::createDraft() to retain ContentType id in the draft
Результат eZ\Publish\SPI\Persistence\Content\Type

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

Note: This method is responsible of having the Field Definitions of the loaded ContentType sorted by placement.
public load ( integer $contentTypeId, integer $status = Type::STATUS_DEFINED ) : eZ\Publish\SPI\Persistence\Content\Type
$contentTypeId integer
$status integer
Результат eZ\Publish\SPI\Persistence\Content\Type

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

public loadAllGroups ( ) : eZ\Publish\SPI\Persistence\Content\Type\Group[]
Результат eZ\Publish\SPI\Persistence\Content\Type\Group[]

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

Note: This method is responsible of having the Field Definitions of the loaded ContentType sorted by placement.
public loadByIdentifier ( string $identifier ) : eZ\Publish\SPI\Persistence\Content\Type
$identifier string
Результат eZ\Publish\SPI\Persistence\Content\Type

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

Note: This method is responsible of having the Field Definitions of the loaded ContentType sorted by placement.
public loadByRemoteId ( mixed $remoteId ) : eZ\Publish\SPI\Persistence\Content\Type
$remoteId mixed
Результат eZ\Publish\SPI\Persistence\Content\Type

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

public loadContentTypes ( mixed $groupId, integer $status ) : eZ\Publish\SPI\Persistence\Content\Type[]
$groupId mixed
$status integer
Результат eZ\Publish\SPI\Persistence\Content\Type[]

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

Loads a single Type from $rows.
protected loadFromRows ( array $rows, mixed $typeIdentifier, integer $status ) : eZ\Publish\SPI\Persistence\Content\Type
$rows array
$typeIdentifier mixed
$status integer
Результат eZ\Publish\SPI\Persistence\Content\Type

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

public loadGroup ( mixed $groupId ) : eZ\Publish\SPI\Persistence\Content\Type\Group
$groupId mixed
Результат eZ\Publish\SPI\Persistence\Content\Type\Group

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

public loadGroupByIdentifier ( string $identifier ) : eZ\Publish\SPI\Persistence\Content\Type\Group
$identifier string
Результат eZ\Publish\SPI\Persistence\Content\Type\Group

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

Updates content objects, depending on the changed field definitions. A content type has a state which tells if its content objects yet have been adapted. Flags the content type as updated.
public publish ( mixed $contentTypeId )
$contentTypeId mixed

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

This method creates a new status of the Type with the field definition referred to by $fieldDefinitionId removed. It does not update existing content objects depending on the field (default) values.
public removeFieldDefinition ( mixed $contentTypeId, $status, mixed $fieldDefinitionId ) : boolean
$contentTypeId mixed
$fieldDefinitionId mixed
Результат boolean

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

public update ( mixed $typeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct $contentType ) : eZ\Publish\SPI\Persistence\Content\Type
$typeId mixed
$status integer
$contentType eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct
Результат eZ\Publish\SPI\Persistence\Content\Type

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

This method creates a new status of the Type with the updated $fieldDefinition. It does not update existing content objects depending on the field (default) values.
public updateFieldDefinition ( mixed $contentTypeId, $status, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition )
$contentTypeId mixed
$fieldDefinition eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition

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

public updateGroup ( eZ\Publish\SPI\Persistence\Content\Type\Group\UpdateStruct $struct ) : eZ\Publish\SPI\Persistence\Content\Type\Group
$struct eZ\Publish\SPI\Persistence\Content\Type\Group\UpdateStruct
Результат eZ\Publish\SPI\Persistence\Content\Type\Group

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

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

protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content\Type $contentTypeGateway
Результат Gateway

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

Mapper for Type objects.
protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content\Type $mapper
Результат Mapper

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

Content Type update handler.
protected Handler,eZ\Publish\Core\Persistence\Legacy\Content\Type\Update $updateHandler
Результат eZ\Publish\Core\Persistence\Legacy\Content\Type\Update\Handler