eZPublishCommunityProject  2013.4
eZ\Publish\Core\Repository\FieldTypeTools Class Reference
+ Inheritance diagram for eZ\Publish\Core\Repository\FieldTypeTools:
+ Collaboration diagram for eZ\Publish\Core\Repository\FieldTypeTools:

Public Member Functions

 addRelation ($relationType, VersionInfo $sourceVersion, $destinationContentId, FieldDefinition $fieldDefinition=null)
 Adds a relation. More...
 

Member Function Documentation

eZ\Publish\Core\Repository\FieldTypeTools::addRelation (   $relationType,
VersionInfo  $sourceVersion,
  $destinationContentId,
FieldDefinition  $fieldDefinition = null 
)

Adds a relation.

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionIf $relationType has an unsupported value
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionIf there is a mismatch between $relationType and provided values.

The source of the relation is the content and version referenced by $sourceVersion.

Parameters
int$relationTypeOne of Relation::COMMON, Relation::EMBED, Relation::LINK or Relation::FIELD
\eZ\Publish\API\Repository\Values\Content\VersionInfo$sourceVersion
mixed$destinationContentId
\eZ\Publish\API\Repository\Values\ContentType\FieldDefinition | null$fieldDefinition
Returns
The newly created relation

Implements eZ\Publish\API\Repository\FieldTypeTools.


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