eZPublishCommunityProject  2013.5
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway Class Reference

Base class for content type gateways. More...

Public Member Functions

 countGroupsForType ($typeId, $status)
 Returns the number of Groups the type is assigned to. More...
 
 countInstancesOfType ($typeId)
 Counts the number of instances that exists of the identified type. More...
 
 countTypesInGroup ($groupId)
 Returns the number of types in a certain group. More...
 
 delete ($typeId, $status)
 Deletes a Type completely. More...
 
 deleteFieldDefinition ($typeId, $status, $fieldDefinitionId)
 Deletes a field definition. More...
 
 deleteFieldDefinitionsForType ($typeId, $status)
 Deletes all field definitions of a Type. More...
 
 deleteGroup ($groupId)
 Deletes the Group with the given $groupId. More...
 
 deleteGroupAssignment ($groupId, $typeId, $status)
 Deletes a group assignments for a Type. More...
 
 deleteGroupAssignmentsForType ($typeId, $status)
 Deletes all group assignments for a Type. More...
 
 deleteType ($typeId, $status)
 Deletes a the Type. More...
 
 insertFieldDefinition ($typeId, $status, FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef)
 Inserts a $fieldDefinition for $typeId. More...
 
 insertGroup (Group $group)
 Inserts the given $group. More...
 
 insertGroupAssignment ($typeId, $status, $groupId)
 Insert assignment of $typeId to $groupId. More...
 
 insertType (Type $type, $typeId=null)
 Inserts a new content type. More...
 
 loadAllGroupsData ()
 Returns an array with data about all Group objects. More...
 
 loadFieldDefinition ($id, $status)
 Loads an array with data about field definition referred $id and $status. More...
 
 loadGroupData ($groupId)
 Returns an array with data about the Group with $groupId. More...
 
 loadGroupDataByIdentifier ($identifier)
 Returns an array with data about the Group with $identifier. More...
 
 loadTypeData ($typeId, $status)
 Loads an array with data about $typeId in $status. More...
 
 loadTypeDataByIdentifier ($identifier, $status)
 Loads an array with data about the type referred to by $identifier in $status. More...
 
 loadTypeDataByRemoteId ($remoteId, $status)
 Loads an array with data about the type referred to by $remoteId in $status. More...
 
 loadTypesDataForGroup ($groupId, $status)
 Loads data for all Types in $status in $groupId. More...
 
 publishTypeAndFields ($typeId, $sourceStatus, $targetStatus)
 Publishes the Type with $typeId from $sourceVersion to $targetVersion, including its fields. More...
 
 updateFieldDefinition ($typeId, $status, FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef)
 Updates a $fieldDefinition for $typeId. More...
 
 updateGroup (GroupUpdateStruct $group)
 Updates a group with data in $group. More...
 
 updateType ($typeId, $status, UpdateStruct $updateStruct)
 Update a type with $updateStruct. More...
 

Detailed Description

Base class for content type gateways.

Member Function Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::countGroupsForType (   $typeId,
  $status 
)
abstract

Returns the number of Groups the type is assigned to.

Parameters
int$typeId
int$status
Returns
int
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::countInstancesOfType (   $typeId)
abstract

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

Parameters
int$typeId
Returns
int
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::countTypesInGroup (   $groupId)
abstract

Returns the number of types in a certain group.

Parameters
int$groupId
Returns
int
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::delete (   $typeId,
  $status 
)
abstract

Deletes a Type completely.

Parameters
mixed$typeId
int$status
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::deleteFieldDefinition (   $typeId,
  $status,
  $fieldDefinitionId 
)
abstract

Deletes a field definition.

Parameters
mixed$typeId
int$status
mixed$fieldDefinitionId
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::deleteFieldDefinitionsForType (   $typeId,
  $status 
)
abstract

Deletes all field definitions of a Type.

Parameters
mixed$typeId
int$status
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::deleteGroup (   $groupId)
abstract

Deletes the Group with the given $groupId.

Parameters
int$groupId
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::deleteGroupAssignment (   $groupId,
  $typeId,
  $status 
)
abstract

Deletes a group assignments for a Type.

Parameters
mixed$groupId
mixed$typeId
int$status
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::deleteGroupAssignmentsForType (   $typeId,
  $status 
)
abstract

Deletes all group assignments for a Type.

Parameters
mixed$typeId
int$status
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::deleteType (   $typeId,
  $status 
)
abstract

Deletes a the Type.

Does no delete the field definitions!

Parameters
mixed$typeId
int$status
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::insertFieldDefinition (   $typeId,
  $status,
FieldDefinition  $fieldDefinition,
StorageFieldDefinition  $storageFieldDef 
)
abstract

Inserts a $fieldDefinition for $typeId.

Parameters
mixed$typeId
int$status
\eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition$fieldDefinition
\eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition$storageFieldDef
Returns
mixed Field definition ID
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::insertGroup ( Group  $group)
abstract

Inserts the given $group.

Parameters
\eZ\Publish\SPI\Persistence\Content\Type\Group$group
Returns
mixed Group ID
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::insertGroupAssignment (   $typeId,
  $status,
  $groupId 
)
abstract

Insert assignment of $typeId to $groupId.

Parameters
mixed$typeId
int$status
mixed$groupId
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::insertType ( Type  $type,
  $typeId = null 
)
abstract

Inserts a new content type.

Parameters
\eZ\Publish\SPI\Persistence\Content\Type$type
mixed | null$typeId
Returns
mixed Type ID
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::loadAllGroupsData ( )
abstract

Returns an array with data about all Group objects.

Returns
array
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::loadFieldDefinition (   $id,
  $status 
)
abstract

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

Parameters
mixed$idfield definition id
int$statusfield definition status
Returns
array Data rows.
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::loadGroupData (   $groupId)
abstract

Returns an array with data about the Group with $groupId.

Parameters
int$groupId
Returns
array
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::loadGroupDataByIdentifier (   $identifier)
abstract

Returns an array with data about the Group with $identifier.

Parameters
int$identifier
Returns
array
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::loadTypeData (   $typeId,
  $status 
)
abstract

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

Parameters
mixed$typeId
int$status
Returns
array Data rows.
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::loadTypeDataByIdentifier (   $identifier,
  $status 
)
abstract

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

Parameters
string$identifier
int$status
Returns
array(int=>array(string=>mixed)) Data rows.
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::loadTypeDataByRemoteId (   $remoteId,
  $status 
)
abstract

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

Parameters
mixed$remoteId
int$status
Returns
array(int=>array(string=>mixed)) Data rows.
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::loadTypesDataForGroup (   $groupId,
  $status 
)
abstract

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

Parameters
mixed$groupId
int$status
Returns
string[][]
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::publishTypeAndFields (   $typeId,
  $sourceStatus,
  $targetStatus 
)
abstract

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

Parameters
int$typeId
int$sourceStatus
int$targetStatus
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::updateFieldDefinition (   $typeId,
  $status,
FieldDefinition  $fieldDefinition,
StorageFieldDefinition  $storageFieldDef 
)
abstract

Updates a $fieldDefinition for $typeId.

Parameters
mixed$typeId
int$status
\eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition$fieldDefinition
\eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition$storageFieldDef
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::updateGroup ( GroupUpdateStruct  $group)
abstract

Updates a group with data in $group.

Parameters
\eZ\Publish\SPI\Persistence\Content\Type\Group\UpdateStruct$group
Returns
void
eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway::updateType (   $typeId,
  $status,
UpdateStruct  $updateStruct 
)
abstract

Update a type with $updateStruct.

Parameters
mixed$typeId
int$status
\eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct$updateStruct
Returns
void

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