Exemplo n.º 1
0
 /**
  * Checks attitude attached object to entity. It is important in right checking in components disk.uf.file, disk.uf.version.
  * @param AttachedObject $attachedObject Attached object.
  * @param string $entityType Entity type (ex. sonet_comment).
  * @param int $entityId Id of entity.
  * @return bool
  */
 public function belongsToEntity(AttachedObject $attachedObject, $entityType, $entityId)
 {
     list($connectorClass, $moduleId) = $this->getConnectorDataByEntityType($entityType);
     return $attachedObject->getEntityId() == $entityId && $attachedObject->getModuleId() == $moduleId && $attachedObject->getEntityType() == $connectorClass;
 }