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

Base class for content type gateways. More...

+ Inheritance diagram for eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\ExceptionConversion:
+ Collaboration diagram for eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\ExceptionConversion:

Public Member Functions

 __construct (Gateway $innerGateway)
 Creates a new exception conversion gateway around $innerGateway. More...
 
 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...
 
- Public Member Functions inherited from eZ\Publish\Core\Persistence\Legacy\Content\Gateway
 deleteContent ($contentId)
 Deletes the actual content object referred to by $contentId. More...
 
 deleteField ($fieldId, $version)
 Deletes the field with the given $fieldId. More...
 
 deleteFields ($contentId, $versionNo=null)
 Deletes all fields of $contentId in all versions. More...
 
 deleteNames ($contentId, $versionNo=null)
 Deletes all names of $contentId. More...
 
 deleteRelation ($relationId, $type)
 Deletes the relation with the given $relationId. More...
 
 deleteRelations ($contentId, $versionNo=null)
 Deletes relations to and from $contentId. More...
 
 deleteVersions ($contentId, $versionNo=null)
 Deletes all versions of $contentId. More...
 
 getAllLocationIds ($contentId)
 Returns all IDs for locations that refer to $contentId. More...
 
 getContext ()
 Get context definition for external storage layers. More...
 
 getFieldIdsByType ($contentId, $versionNo=null)
 Returns all field IDs of $contentId grouped by their type. More...
 
 getLastVersionNumber ($contentId)
 Returns last version number for content identified by $contentId. More...
 
 insertContentObject (CreateStruct $struct, $currentVersionNo=1)
 Inserts a new content object. More...
 
 insertExistingField (Content $content, Field $field, StorageFieldValue $value)
 Inserts an existing field. More...
 
 insertNewField (Content $content, Field $field, StorageFieldValue $value)
 Inserts a new field. More...
 
 insertRelation (RelationCreateStruct $createStruct)
 Inserts a new relation database record. More...
 
 insertVersion (VersionInfo $versionInfo, array $fields)
 Inserts a new version. More...
 
 listVersions ($contentId)
 Returns all version data for the given $contentId. More...
 
 listVersionsForUser ($userId, $status=VersionInfo::STATUS_DRAFT)
 Returns data for all versions with given status created by the given $userId. More...
 
 load ($contentId, $version, $translations=null)
 Loads data for a content object. More...
 
 loadContentInfo ($contentId)
 Loads info for content identified by $contentId. More...
 
 loadLatestPublishedData ($contentId)
 Loads data for the latest published version of the content identified by $contentId. More...
 
 loadRelations ($contentId, $contentVersionNo=null, $relationType=null)
 Loads data of related to/from $contentId. More...
 
 loadReverseRelations ($contentId, $relationType=null)
 Loads data of related to/from $contentId. More...
 
 loadVersionInfo ($contentId, $versionNo)
 Loads version info for content identified by $contentId and $versionNo. More...
 
 setName ($contentId, $version, $name, $language)
 Sets the content object name. More...
 
 setStatus ($contentId, $version, $status)
 Sets the state of object identified by $contentId and $version to $state. More...
 
 updateAlwaysAvailableFlag ($contentId, $newAlwaysAvailable)
 Updates "always available" flag for content identified by $contentId, in respect to $alwaysAvailable. More...
 
 updateContent ($contentId, MetadataUpdateStruct $struct)
 Updates an existing content identified by $contentId in respect to $struct. More...
 
 updateField (Field $field, StorageFieldValue $value)
 Updates an existing field. More...
 
 updateNonTranslatableField (Field $field, StorageFieldValue $value, $contentId)
 Updates an existing, non-translatable field. More...
 
 updateVersion ($contentId, $versionNo, UpdateStruct $struct)
 Updates version $versionNo for content identified by $contentId, in respect to $struct. More...
 

Protected Attributes

 $innerGateway
 

Detailed Description

Base class for content type gateways.

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\ExceptionConversion::__construct ( Gateway  $innerGateway)

Creates a new exception conversion gateway around $innerGateway.

Parameters
Gateway$innerGateway

Member Function Documentation

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

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\ExceptionConversion::countInstancesOfType (   $typeId)

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

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

Returns the number of types in a certain group.

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

Deletes a Type completely.

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

Deletes a field definition.

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

Deletes all field definitions of a Type.

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

Deletes the Group with the given $groupId.

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

Deletes a group assignments for a Type.

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

Deletes all group assignments for a Type.

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

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\ExceptionConversion::insertFieldDefinition (   $typeId,
  $status,
FieldDefinition  $fieldDefinition,
StorageFieldDefinition  $storageFieldDef 
)

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\ExceptionConversion::insertGroup ( Group  $group)

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\ExceptionConversion::insertGroupAssignment (   $typeId,
  $status,
  $groupId 
)

Insert assignment of $typeId to $groupId.

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

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\ExceptionConversion::loadAllGroupsData ( )

Returns an array with data about all Group objects.

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

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\ExceptionConversion::loadGroupData (   $groupId)

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

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

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

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

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\ExceptionConversion::loadTypeDataByIdentifier (   $identifier,
  $status 
)

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\ExceptionConversion::loadTypeDataByRemoteId (   $remoteId,
  $status 
)

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\ExceptionConversion::loadTypesDataForGroup (   $groupId,
  $status 
)

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

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

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\ExceptionConversion::updateFieldDefinition (   $typeId,
  $status,
FieldDefinition  $fieldDefinition,
StorageFieldDefinition  $storageFieldDef 
)

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\ExceptionConversion::updateGroup ( GroupUpdateStruct  $group)

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\ExceptionConversion::updateType (   $typeId,
  $status,
UpdateStruct  $updateStruct 
)

Update a type with $updateStruct.

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

Member Data Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\ExceptionConversion::$innerGateway
protected

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