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


PHP ReferenceManager::removeCrossReference方法代码示例

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


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

示例1: removePreviousCrossReferences

 private function removePreviousCrossReferences(Project $project, $revision, $old_commit_message)
 {
     $GLOBALS['group_id'] = $project->getID();
     $references = $this->reference_manager->extractReferences($old_commit_message, $project->getID());
     foreach ($references as $reference_instance) {
         /* @var $reference Reference */
         $reference = $reference_instance->getReference();
         if ($reference) {
             $cross_reference = new CrossReference($revision, $project->getID(), ReferenceManager::REFERENCE_NATURE_SVNREVISION, '', $reference_instance->getValue(), $reference->getGroupId(), $reference->getNature(), '', '');
             $this->reference_manager->removeCrossReference($cross_reference);
         }
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:PostRevPropset.class.php

示例2: removeBetweenTwoArtifacts

 /**
  * Remove from database a cross reference between $source_artifact and $target_artifact
  *
  * @param Tracker_Artifact $source_artifact
  * @param Tracker_Artifact $target_artifact
  * @param PFUser $user
  *
  * @return boolean
  */
 public function removeBetweenTwoArtifacts(Tracker_Artifact $source_artifact, Tracker_Artifact $target_artifact, PFUser $user)
 {
     return $this->reference_manager->removeCrossReference($this->getCrossReferenceBetweenTwoArtifacts($source_artifact, $target_artifact, $user));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:ReferenceManager.class.php

示例3: CrossReference

<?php

require_once 'pre.php';
require_once 'common/reference/ReferenceManager.class.php';
$target_id = $request->get('target_id');
$target_gid = $request->get('target_gid');
$target_type = $request->get('target_type');
$target_key = $request->get('target_key');
$source_id = $request->get('source_id');
$source_gid = $request->get('source_gid');
$source_type = $request->get('source_type');
$source_key = $request->get('source_key');
$user = UserManager::instance()->getCurrentUser();
$project_admin = $user->isMember($target_gid, 'A');
if (!$project_admin) {
    $project_admin_source = $user->isMember($source_gid, 'A');
    if ($project_admin_source) {
        $project_admin = true;
    }
}
if ($project_admin) {
    $cross_reference = new CrossReference($source_id, $source_gid, $source_type, $source_key, $target_id, $target_gid, $target_type, $target_key, $user->getId());
    $reference_manager = new ReferenceManager();
    $reference_manager->removeCrossReference($cross_reference);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:25,代码来源:rmreference.php


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