本文整理汇总了PHP中TrackerFactory::getTrackersByGroupIdUserCanView方法的典型用法代码示例。如果您正苦于以下问题:PHP TrackerFactory::getTrackersByGroupIdUserCanView方法的具体用法?PHP TrackerFactory::getTrackersByGroupIdUserCanView怎么用?PHP TrackerFactory::getTrackersByGroupIdUserCanView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TrackerFactory
的用法示例。
在下文中一共展示了TrackerFactory::getTrackersByGroupIdUserCanView方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build
/**
* @return Tracker_CrossSearch_SearchView
*/
public function build(User $user, Project $project, Tracker_CrossSearch_Query $cross_search_query)
{
$report = $this->getReport($user);
$service = $this->getService($project);
$criteria = $this->getCriteria($user, $project, $report, $cross_search_query);
$trackers = $this->tracker_factory->getTrackersByGroupIdUserCanView($project->getGroupId(), $user);
$tracker_ids = $this->getTrackersIds($trackers);
$artifacts = $this->getHierarchicallySortedArtifacts($user, $project, $tracker_ids, $cross_search_query);
$content_view = new Tracker_CrossSearch_SearchContentView($report, $criteria, $artifacts, Tracker_ArtifactFactory::instance(), $this->form_element_factory, $user);
return new Tracker_CrossSearch_SearchView($project, $service, $criteria, $trackers, $content_view);
}
示例2: getDeniedTrackersForATrackerHierarchy
public function getDeniedTrackersForATrackerHierarchy(Tracker $tracker, PFUser $user)
{
$concerned_by_scrum = $this->isScrumHierarchy($tracker);
$concerned_by_kanban = $this->isKanbanHierarchy($tracker);
if (!$concerned_by_scrum && !$concerned_by_kanban) {
return array();
}
$available_trackers = $this->tracker_factory->getTrackersByGroupIdUserCanView($tracker->getGroupId(), $user);
if ($concerned_by_scrum) {
$possible_trackers = $this->getTrackersConcernedByScrum($available_trackers, $tracker->getProject());
return array_diff($available_trackers, $possible_trackers);
}
$possible_trackers = $this->getTrackersConcernedByKanban($available_trackers, $tracker->getProject());
return array_diff($available_trackers, $possible_trackers);
}
示例3: getTrackersWithKanbanUsageAndHierarchy
public function getTrackersWithKanbanUsageAndHierarchy($project_id, PFUser $user)
{
$trackers = array();
$all_trackers = $this->tracker_factory->getTrackersByGroupIdUserCanView($project_id, $user);
foreach ($all_trackers as $tracker) {
$tracker_representation = array();
$tracker_representation['id'] = $tracker->getId();
$tracker_representation['name'] = $tracker->getName();
if ($this->doesKanbanExistForTracker($tracker) || $this->hierarchy_checker->isScrumHierarchy($tracker)) {
$tracker_representation['used'] = true;
$trackers[] = $tracker_representation;
continue;
}
$tracker_representation['used'] = false;
$trackers[] = $tracker_representation;
}
return $trackers;
}