當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。