Class

eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\DoctrineDatabase

class DoctrineDatabase extends Gateway

Doctrine database based content type gateway.

Methods

mixed insertGroup(Group $group)

Inserts the given $group.

updateGroup(UpdateStruct $group)

Updates a group with data in $group.

int countTypesInGroup(int $groupId)

Returns the number of types in a certain group.

int countGroupsForType(int $typeId, int $status)

Returns the number of Groups the type is assigned to.

deleteGroup(int $groupId)

Deletes the Group with the given $groupId.

string[][] loadGroupData(array $groupIds)

Loads data about Groups with $groupIds.

string[][] loadGroupDataByIdentifier(mixed $identifier)

Loads data about Group with $identifier.

string[][] loadAllGroupsData()

Returns an array with data about all Group objects.

string[][] loadTypesDataForGroup(mixed $groupId, int $status)

Loads data for all Types in $status in $groupId.

mixed insertType(Type $type, mixed|null $typeId = null)

Inserts a new content type.

insertGroupAssignment(mixed $groupId, mixed $typeId, int $status)

Insert assignment of $typeId to $groupId.

deleteGroupAssignment(mixed $groupId, mixed $typeId, int $status)

Deletes a group assignments for a Type.

array loadFieldDefinition(mixed $id, int $status)

Loads an array with data about field definition referred $id and $status.

mixed insertFieldDefinition(mixed $typeId, int $status, FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef)

Inserts a $fieldDefinition for $typeId.

deleteFieldDefinition(mixed $typeId, int $status, mixed $fieldDefinitionId)

Deletes a field definition.

updateFieldDefinition(mixed $typeId, int $status, FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef)

Updates a $fieldDefinition for $typeId.

updateType(mixed $typeId, int $status, UpdateStruct $updateStruct)

Update a type with $updateStruct.

array loadTypeData(mixed $typeId, int $status)

Loads an array with data about $typeId in $status.

array(int=>array(string=>mixed)) loadTypeDataByIdentifier(string $identifier, int $status)

Loads an array with data about the type referred to by $identifier in $status.

array(int=>array(string=>mixed)) loadTypeDataByRemoteId(mixed $remoteId, int $status)

Loads an array with data about the type referred to by $remoteId in $status.

int countInstancesOfType(int $typeId)

Counts the number of instances that exists of the identified type.

delete(mixed $typeId, int $status)

Deletes a Type completely.

deleteFieldDefinitionsForType(mixed $typeId, int $status)

Deletes all field definitions of a Type.

deleteType(mixed $typeId, int $status)

Deletes a the Type.

deleteGroupAssignmentsForType(mixed $typeId, int $status)

Deletes all group assignments for a Type.

publishTypeAndFields(int $typeId, int $sourceVersion, int $targetVersion)

Publishes the Type with $typeId from $sourceVersion to $targetVersion, including its fields.

array getSearchableFieldMapData()

Returns searchable field mapping data.

__construct(DatabaseHandler $db, Connection $connection, MaskGenerator $languageMaskGenerator)

Creates a new gateway based on $db.

Details

at line 131
public mixed insertGroup(Group $group)

Inserts the given $group.

Parameters

Group $group

Return Value

mixed Group ID

at line 167
public updateGroup(UpdateStruct $group)

Updates a group with data in $group.

Parameters

UpdateStruct $group

at line 198
public int countTypesInGroup(int $groupId)

Returns the number of types in a certain group.

Parameters

int $groupId

Return Value

int

at line 231
public int countGroupsForType(int $typeId, int $status)

Returns the number of Groups the type is assigned to.

Parameters

int $typeId
int $status

Return Value

int

at line 269
public deleteGroup(int $groupId)

Deletes the Group with the given $groupId.

Parameters

int $groupId

at line 489
public string[][] loadGroupData(array $groupIds)

Loads data about Groups with $groupIds.

Parameters

array $groupIds

Return Value

string[][]

at line 508
public string[][] loadGroupDataByIdentifier(mixed $identifier)

Loads data about Group with $identifier.

Parameters

mixed $identifier

Return Value

string[][]

at line 528
public string[][] loadAllGroupsData()

Returns an array with data about all Group objects.

Return Value

string[][]

at line 568
public string[][] loadTypesDataForGroup(mixed $groupId, int $status)

Loads data for all Types in $status in $groupId.

Parameters

mixed $groupId
int $status

Return Value

string[][]

at line 330
public mixed insertType(Type $type, mixed|null $typeId = null)

Inserts a new content type.

Parameters

Type $type
mixed|null $typeId

Return Value

mixed Type ID

at line 426
public insertGroupAssignment(mixed $groupId, mixed $typeId, int $status)

Insert assignment of $typeId to $groupId.

Parameters

mixed $groupId
mixed $typeId
int $status

at line 458
public deleteGroupAssignment(mixed $groupId, mixed $typeId, int $status)

Deletes a group assignments for a Type.

Parameters

mixed $groupId
mixed $typeId
int $status

at line 733
public array loadFieldDefinition(mixed $id, int $status)

Loads an array with data about field definition referred $id and $status.

Parameters

mixed $id field definition id
int $status One of Type::STATUSDEFINED|Type::STATUSDRAFT|Type::STATUS_MODIFIED

Return Value

array Data rows.

at line 607
public mixed insertFieldDefinition(mixed $typeId, int $status, FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef)

Inserts a $fieldDefinition for $typeId.

Parameters

mixed $typeId
int $status
FieldDefinition $fieldDefinition
StorageFieldDefinition $storageFieldDef

Return Value

mixed Field definition ID

at line 765
public deleteFieldDefinition(mixed $typeId, int $status, mixed $fieldDefinitionId)

Deletes a field definition.

Parameters

mixed $typeId
int $status
mixed $fieldDefinitionId

at line 799
public updateFieldDefinition(mixed $typeId, int $status, FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef)

Updates a $fieldDefinition for $typeId.

Parameters

mixed $typeId
int $status
FieldDefinition $fieldDefinition
StorageFieldDefinition $storageFieldDef

at line 861
public updateType(mixed $typeId, int $status, UpdateStruct $updateStruct)

Update a type with $updateStruct.

Parameters

mixed $typeId
int $status
UpdateStruct $updateStruct

at line 895
public array loadTypeData(mixed $typeId, int $status)

Loads an array with data about $typeId in $status.

Parameters

mixed $typeId
int $status

Return Value

array Data rows.

at line 925
public array(int=>array(string=>mixed)) loadTypeDataByIdentifier(string $identifier, int $status)

Loads an array with data about the type referred to by $identifier in $status.

Parameters

string $identifier
int $status

Return Value

array(int=>array(string=>mixed)) Data rows.

at line 955
public array(int=>array(string=>mixed)) loadTypeDataByRemoteId(mixed $remoteId, int $status)

Loads an array with data about the type referred to by $remoteId in $status.

Parameters

mixed $remoteId
int $status

Return Value

array(int=>array(string=>mixed)) Data rows.

at line 1056
public int countInstancesOfType(int $typeId)

Counts the number of instances that exists of the identified type.

Parameters

int $typeId

Return Value

int

at line 1113
public delete(mixed $typeId, int $status)

Deletes a Type completely.

Parameters

mixed $typeId
int $status

at line 1087
public deleteFieldDefinitionsForType(mixed $typeId, int $status)

Deletes all field definitions of a Type.

Parameters

mixed $typeId
int $status

at line 1129
public deleteType(mixed $typeId, int $status)

Deletes a the Type.

Does no delete the field definitions!

Parameters

mixed $typeId
int $status

at line 1155
public deleteGroupAssignmentsForType(mixed $typeId, int $status)

Deletes all group assignments for a Type.

Parameters

mixed $typeId
int $status

at line 1183
public publishTypeAndFields(int $typeId, int $sourceVersion, int $targetVersion)

Publishes the Type with $typeId from $sourceVersion to $targetVersion, including its fields.

Parameters

int $typeId
int $sourceVersion
int $targetVersion

at line 1290
public array getSearchableFieldMapData()

Returns searchable field mapping data.

Return Value

array

at line 117
public __construct(DatabaseHandler $db, Connection $connection, MaskGenerator $languageMaskGenerator)

Creates a new gateway based on $db.

Parameters

DatabaseHandler $db
Connection $connection
MaskGenerator $languageMaskGenerator