/** * Sets the designated parameter to the given object ID. * * @param integer $parameterIndex the parameter index (one-based) * @param ObjectIdInterface $id the object ID */ public function setId($parameterIndex, ObjectIdInterface $id) { $this->setParameter($parameterIndex, $this->escape($id->getId())); }
/** * Removes this object from a folder. * * @param ObjectIdInterface $folderId the object ID of the folder from which this object should be removed */ public function removeFromFolder(ObjectIdInterface $folderId) { $objectId = $this->getId(); $this->getBinding()->getMultiFilingService()->removeObjectFromFolder($this->getRepositoryId(), $objectId, $folderId->getId(), null); // remove object form cache $this->getSession()->removeObjectFromCache($this->getSession()->createObjectId($objectId)); }
/** * Fetches the relationships from or to an object from the repository. * * @param ObjectIdInterface $objectId * @param boolean $includeSubRelationshipTypes * @param RelationshipDirection $relationshipDirection * @param ObjectTypeInterface $type * @param OperationContextInterface|null $context * @return RelationshipInterface[] */ public function getRelationships(ObjectIdInterface $objectId, $includeSubRelationshipTypes, RelationshipDirection $relationshipDirection, ObjectTypeInterface $type, OperationContextInterface $context = null) { if ($context === null) { $context = $this->getDefaultContext(); } // TODO: Implement cache! return $this->getBinding()->getRelationshipService()->getObjectRelationships($this->getRepositoryId(), $objectId->getId(), $includeSubRelationshipTypes, $relationshipDirection, $type->getId()); }