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

Inheritance: extends eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway
Afficher le fichier Open project: ezsystems/ezpublish-kernel

Protected Properties

Свойство Type Description
$columns array Columns of database tables.
$dbHandler eZ\Publish\Core\Persistence\Database\DatabaseHandler DoctrineDatabase handler.
$languageMaskGenerator eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator Language mask generator.

Méthodes publiques

Méthode Description
__construct ( eZ\Publish\Core\Persistence\Database\DatabaseHandler $db, MaskGenerator $languageMaskGenerator ) Creates a new gateway based on $db.
countGroupsForType ( integer $typeId, integer $status ) : integer Returns the number of Groups the type is assigned to.
countInstancesOfType ( integer $typeId ) : integer Counts the number of instances that exists of the identified type.
countTypesInGroup ( integer $groupId ) : integer Returns the number of types in a certain group.
delete ( mixed $typeId, integer $status ) Deletes a Type completely.
deleteFieldDefinition ( mixed $typeId, integer $status, mixed $fieldDefinitionId ) Deletes a field definition.
deleteFieldDefinitionsForType ( mixed $typeId, integer $status ) Deletes all field definitions of a Type.
deleteGroup ( integer $groupId ) Deletes the Group with the given $groupId.
deleteGroupAssignment ( mixed $groupId, mixed $typeId, integer $status ) Deletes a group assignments for a Type.
deleteGroupAssignmentsForType ( mixed $typeId, integer $status ) Deletes all group assignments for a Type.
deleteType ( mixed $typeId, integer $status ) Deletes a the Type.
getSearchableFieldMapData ( ) : array Returns searchable field mapping data.
insertFieldDefinition ( mixed $typeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef ) : mixed Inserts a $fieldDefinition for $typeId.
insertGroup ( eZ\Publish\SPI\Persistence\Content\Type\Group $group ) : mixed Inserts the given $group.
insertGroupAssignment ( mixed $groupId, mixed $typeId, integer $status ) Insert assignment of $typeId to $groupId.
insertType ( eZ\Publish\SPI\Persistence\Content\Type $type, mixed | null $typeId = null ) : mixed Inserts a new content type.
loadAllGroupsData ( ) : string[][] Returns an array with data about all Group objects.
loadFieldDefinition ( mixed $id, integer $status ) : array Loads an array with data about field definition referred $id and $status.
loadGroupData ( mixed $groupId ) : string[][] Loads data about Group with $groupId.
loadGroupDataByIdentifier ( mixed $identifier ) : string[][] Loads data about Group with $identifier.
loadTypeData ( mixed $typeId, integer $status ) : array Loads an array with data about $typeId in $status.
loadTypeDataByIdentifier ( string $identifier, integer $status ) : array(int=>array(string=>mixed)) Loads an array with data about the type referred to by $identifier in $status.
loadTypeDataByRemoteId ( mixed $remoteId, integer $status ) : array(int=>array(string=>mixed)) Loads an array with data about the type referred to by $remoteId in $status.
loadTypesDataForGroup ( mixed $groupId, integer $status ) : string[][] Loads data for all Types in $status in $groupId.
publishTypeAndFields ( integer $typeId, integer $sourceVersion, integer $targetVersion ) Publishes the Type with $typeId from $sourceVersion to $targetVersion, including its fields.
updateFieldDefinition ( mixed $typeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef ) Updates a $fieldDefinition for $typeId.
updateGroup ( eZ\Publish\SPI\Persistence\Content\Type\Group\UpdateStruct $group ) Updates a group with data in $group.
updateType ( mixed $typeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct $updateStruct ) Update a type with $updateStruct.

Méthodes protégées

Méthode Description
createGroupLoadQuery ( ) : eZ\Publish\Core\Persistence\Database\SelectQuery Creates the basic query to load Group data.
deleteTypeNameData ( integer $typeId, integer $typeStatus ) Deletes all name data for $typeId in $typeStatus.
getLoadTypeQuery ( ) : eZ\Publish\Core\Persistence\Database\SelectQuery Returns a basic query to retrieve Type data.
insertTypeNameData ( integer $typeId, integer $typeStatus, array $languages ) Inserts data into contentclass_name.
selectColumns ( eZ\Publish\Core\Persistence\Database\SelectQuery $q, string $tableName ) Creates an array of select columns for $tableName.
setCommonFieldColumns ( eZ\Publish\Core\Persistence\Database\Query $q, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef ) Set common columns for insert/update of FieldDefinition.
setCommonTypeColumns ( eZ\Publish\Core\Persistence\Database\Query $q, eZ\Publish\SPI\Persistence\ValueObject $type ) Set common columns for insert/update of a Type.

Method Details

__construct() public méthode

Creates a new gateway based on $db.
public __construct ( eZ\Publish\Core\Persistence\Database\DatabaseHandler $db, MaskGenerator $languageMaskGenerator )
$db eZ\Publish\Core\Persistence\Database\DatabaseHandler
$languageMaskGenerator eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator

countGroupsForType() public méthode

Returns the number of Groups the type is assigned to.
public countGroupsForType ( integer $typeId, integer $status ) : integer
$typeId integer
$status integer
Résultat integer

countInstancesOfType() public méthode

Counts the number of instances that exists of the identified type.
public countInstancesOfType ( integer $typeId ) : integer
$typeId integer
Résultat integer

countTypesInGroup() public méthode

Returns the number of types in a certain group.
public countTypesInGroup ( integer $groupId ) : integer
$groupId integer
Résultat integer

createGroupLoadQuery() protected méthode

Creates the basic query to load Group data.
protected createGroupLoadQuery ( ) : eZ\Publish\Core\Persistence\Database\SelectQuery
Résultat eZ\Publish\Core\Persistence\Database\SelectQuery

delete() public méthode

Deletes a Type completely.
public delete ( mixed $typeId, integer $status )
$typeId mixed
$status integer

deleteFieldDefinition() public méthode

Deletes a field definition.
public deleteFieldDefinition ( mixed $typeId, integer $status, mixed $fieldDefinitionId )
$typeId mixed
$status integer
$fieldDefinitionId mixed

deleteFieldDefinitionsForType() public méthode

Deletes all field definitions of a Type.
public deleteFieldDefinitionsForType ( mixed $typeId, integer $status )
$typeId mixed
$status integer

deleteGroup() public méthode

Deletes the Group with the given $groupId.
public deleteGroup ( integer $groupId )
$groupId integer

deleteGroupAssignment() public méthode

Deletes a group assignments for a Type.
public deleteGroupAssignment ( mixed $groupId, mixed $typeId, integer $status )
$groupId mixed
$typeId mixed
$status integer

deleteGroupAssignmentsForType() public méthode

Deletes all group assignments for a Type.
public deleteGroupAssignmentsForType ( mixed $typeId, integer $status )
$typeId mixed
$status integer

deleteType() public méthode

Does no delete the field definitions!
public deleteType ( mixed $typeId, integer $status )
$typeId mixed
$status integer

deleteTypeNameData() protected méthode

Deletes all name data for $typeId in $typeStatus.
protected deleteTypeNameData ( integer $typeId, integer $typeStatus )
$typeId integer
$typeStatus integer

getLoadTypeQuery() protected méthode

Returns a basic query to retrieve Type data.
protected getLoadTypeQuery ( ) : eZ\Publish\Core\Persistence\Database\SelectQuery
Résultat eZ\Publish\Core\Persistence\Database\SelectQuery

getSearchableFieldMapData() public méthode

Returns searchable field mapping data.
public getSearchableFieldMapData ( ) : array
Résultat array

insertFieldDefinition() public méthode

Inserts a $fieldDefinition for $typeId.
public insertFieldDefinition ( mixed $typeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef ) : mixed
$typeId mixed
$status integer
$fieldDefinition eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
$storageFieldDef eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition
Résultat mixed Field definition ID

insertGroup() public méthode

Inserts the given $group.
public insertGroup ( eZ\Publish\SPI\Persistence\Content\Type\Group $group ) : mixed
$group eZ\Publish\SPI\Persistence\Content\Type\Group
Résultat mixed Group ID

insertGroupAssignment() public méthode

Insert assignment of $typeId to $groupId.
public insertGroupAssignment ( mixed $groupId, mixed $typeId, integer $status )
$groupId mixed
$typeId mixed
$status integer

insertType() public méthode

Inserts a new content type.
public insertType ( eZ\Publish\SPI\Persistence\Content\Type $type, mixed | null $typeId = null ) : mixed
$type eZ\Publish\SPI\Persistence\Content\Type
$typeId mixed | null
Résultat mixed Type ID

insertTypeNameData() protected méthode

Inserts data into contentclass_name.
protected insertTypeNameData ( integer $typeId, integer $typeStatus, array $languages )
$typeId integer
$typeStatus integer
$languages array

loadAllGroupsData() public méthode

Returns an array with data about all Group objects.
public loadAllGroupsData ( ) : string[][]
Résultat string[][]

loadFieldDefinition() public méthode

Loads an array with data about field definition referred $id and $status.
public loadFieldDefinition ( mixed $id, integer $status ) : array
$id mixed field definition id
$status integer One of Type::STATUS_DEFINED|Type::STATUS_DRAFT|Type::STATUS_MODIFIED
Résultat array Data rows.

loadGroupData() public méthode

Loads data about Group with $groupId.
public loadGroupData ( mixed $groupId ) : string[][]
$groupId mixed
Résultat string[][]

loadGroupDataByIdentifier() public méthode

Loads data about Group with $identifier.
public loadGroupDataByIdentifier ( mixed $identifier ) : string[][]
$identifier mixed
Résultat string[][]

loadTypeData() public méthode

Loads an array with data about $typeId in $status.
public loadTypeData ( mixed $typeId, integer $status ) : array
$typeId mixed
$status integer
Résultat array Data rows.

loadTypeDataByIdentifier() public méthode

Loads an array with data about the type referred to by $identifier in $status.
public loadTypeDataByIdentifier ( string $identifier, integer $status ) : array(int=>array(string=>mixed))
$identifier string
$status integer
Résultat array(int=>array(string=>mixed))

loadTypeDataByRemoteId() public méthode

Loads an array with data about the type referred to by $remoteId in $status.
public loadTypeDataByRemoteId ( mixed $remoteId, integer $status ) : array(int=>array(string=>mixed))
$remoteId mixed
$status integer
Résultat array(int=>array(string=>mixed))

loadTypesDataForGroup() public méthode

Loads data for all Types in $status in $groupId.
public loadTypesDataForGroup ( mixed $groupId, integer $status ) : string[][]
$groupId mixed
$status integer
Résultat string[][]

publishTypeAndFields() public méthode

Publishes the Type with $typeId from $sourceVersion to $targetVersion, including its fields.
public publishTypeAndFields ( integer $typeId, integer $sourceVersion, integer $targetVersion )
$typeId integer
$sourceVersion integer
$targetVersion integer

selectColumns() protected méthode

Creates an array of select columns for $tableName.
protected selectColumns ( eZ\Publish\Core\Persistence\Database\SelectQuery $q, string $tableName )
$q eZ\Publish\Core\Persistence\Database\SelectQuery
$tableName string

setCommonFieldColumns() protected méthode

Set common columns for insert/update of FieldDefinition.
protected setCommonFieldColumns ( eZ\Publish\Core\Persistence\Database\Query $q, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef )
$q eZ\Publish\Core\Persistence\Database\Query
$fieldDefinition eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
$storageFieldDef eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition

setCommonTypeColumns() protected méthode

Set common columns for insert/update of a Type.
protected setCommonTypeColumns ( eZ\Publish\Core\Persistence\Database\Query $q, eZ\Publish\SPI\Persistence\ValueObject $type )
$q eZ\Publish\Core\Persistence\Database\Query
$type eZ\Publish\SPI\Persistence\ValueObject

updateFieldDefinition() public méthode

Updates a $fieldDefinition for $typeId.
public updateFieldDefinition ( mixed $typeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef )
$typeId mixed
$status integer
$fieldDefinition eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
$storageFieldDef eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition

updateGroup() public méthode

Updates a group with data in $group.
public updateGroup ( eZ\Publish\SPI\Persistence\Content\Type\Group\UpdateStruct $group )
$group eZ\Publish\SPI\Persistence\Content\Type\Group\UpdateStruct

updateType() public méthode

Update a type with $updateStruct.
public updateType ( mixed $typeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct $updateStruct )
$typeId mixed
$status integer
$updateStruct eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct

Property Details

$columns protected_oe property

Columns of database tables.
protected array $columns
Résultat array

$dbHandler protected_oe property

DoctrineDatabase handler.
protected DatabaseHandler,eZ\Publish\Core\Persistence\Database $dbHandler
Résultat eZ\Publish\Core\Persistence\Database\DatabaseHandler

$languageMaskGenerator protected_oe property

Language mask generator.
protected MaskGenerator,eZ\Publish\Core\Persistence\Legacy\Content\Language $languageMaskGenerator
Résultat eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator