本文整理汇总了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);
}
}
}
示例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));
}
示例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);
}