当前位置: 首页>>代码示例>>PHP>>正文


PHP Vtiger_Relation_Model::deleteRelation方法代码示例

本文整理汇总了PHP中Vtiger_Relation_Model::deleteRelation方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Relation_Model::deleteRelation方法的具体用法?PHP Vtiger_Relation_Model::deleteRelation怎么用?PHP Vtiger_Relation_Model::deleteRelation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Vtiger_Relation_Model的用法示例。


在下文中一共展示了Vtiger_Relation_Model::deleteRelation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: deleteRelation

 /**
  * Function that deletes PriceBooks related records information
  * @param <Integer> $sourceRecordId - PriceBook Id
  * @param <Integer> $relatedRecordId - Related Record Id
  */
 public function deleteRelation($sourceRecordId, $relatedRecordId)
 {
     $sourceModuleName = $this->getParentModuleModel()->get('name');
     $destinationModuleName = $this->getRelationModuleModel()->get('name');
     if ($sourceModuleName == 'PriceBooks' && ($destinationModuleName == 'Products' || $destinationModuleName == 'Services')) {
         $priceBookModel = Vtiger_Record_Model::getInstanceById($sourceRecordId, $sourceModuleName);
         $priceBookModel->deleteListPrice($relatedRecordId);
     } else {
         parent::deleteRelation($sourceRecordId, $relatedRecordId);
     }
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:16,代码来源:Relation.php

示例2: deleteRelation

 /**
  * Function that deletes PriceBooks related records information
  * @param <Integer> $sourceRecordId - Product/Service Id
  * @param <Integer> $relatedRecordId - Related Record Id
  */
 public function deleteRelation($sourceRecordId, $relatedRecordId)
 {
     $sourceModuleName = $this->getParentModuleModel()->get('name');
     $relatedModuleName = $this->getRelationModuleModel()->get('name');
     if (($sourceModuleName == 'Products' || $sourceModuleName == 'Services') && $relatedModuleName == 'PriceBooks') {
         //Description: deleteListPrice function is deleting the relation between Pricebook and Product/Service
         $priceBookModel = Vtiger_Record_Model::getInstanceById($relatedRecordId, $relatedModuleName);
         $priceBookModel->deleteListPrice($sourceRecordId);
     } else {
         if ($sourceModuleName == $relatedModuleName) {
             $this->deleteProductToProductRelation($sourceRecordId, $relatedRecordId);
         } else {
             parent::deleteRelation($sourceRecordId, $relatedRecordId);
         }
     }
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:21,代码来源:Relation.php


注:本文中的Vtiger_Relation_Model::deleteRelation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。