本文整理汇总了PHP中thebuggenie\core\entities\Project::getAllByQaResponsible方法的典型用法代码示例。如果您正苦于以下问题:PHP Project::getAllByQaResponsible方法的具体用法?PHP Project::getAllByQaResponsible怎么用?PHP Project::getAllByQaResponsible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thebuggenie\core\entities\Project
的用法示例。
在下文中一共展示了Project::getAllByQaResponsible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: componentArchivedProjects
public function componentArchivedProjects()
{
if (!isset($this->target)) {
$this->projects = entities\Project::getAllRootProjects(true);
$this->project_count = count($this->projects);
} elseif ($this->target == 'team') {
$this->team = entities\Team::getB2DBTable()->selectById($this->id);
$projects = array();
foreach (entities\Project::getAllByOwner($this->team) as $project) {
$projects[$project->getID()] = $project;
}
foreach (entities\Project::getAllByLeader($this->team) as $project) {
$projects[$project->getID()] = $project;
}
foreach (entities\Project::getAllByQaResponsible($this->team) as $project) {
$projects[$project->getID()] = $project;
}
foreach ($this->team->getAssociatedProjects() as $project_id => $project) {
$projects[$project_id] = $project;
}
$final_projects = array();
foreach ($projects as $project) {
if ($project->isArchived()) {
$final_projects[] = $project;
}
}
$this->projects = $final_projects;
} elseif ($this->target == 'client') {
$this->client = entities\Client::getB2DBTable()->selectById($this->id);
$projects = entities\Project::getAllByClientID($this->client->getID());
$final_projects = array();
foreach ($projects as $project) {
if (!$project->isArchived()) {
$final_projects[] = $project;
}
}
$this->projects = $final_projects;
} elseif ($this->target == 'project') {
$this->parent = entities\Project::getB2DBTable()->selectById($this->id);
$this->projects = $this->parent->getChildren(true);
}
$this->project_count = count($this->projects);
}
示例2: runTeamDashboard
/**
* Team Dashboard
*
* @param \thebuggenie\core\framework\Request $request
*/
public function runTeamDashboard(framework\Request $request)
{
try {
$this->team = entities\Team::getB2DBTable()->selectById($request['team_id']);
$this->forward403Unless($this->team->hasAccess());
$projects = array();
foreach (entities\Project::getAllByOwner($this->team) as $project) {
$projects[$project->getID()] = $project;
}
foreach (entities\Project::getAllByLeader($this->team) as $project) {
$projects[$project->getID()] = $project;
}
foreach (entities\Project::getAllByQaResponsible($this->team) as $project) {
$projects[$project->getID()] = $project;
}
foreach ($this->team->getAssociatedProjects() as $project_id => $project) {
$projects[$project_id] = $project;
}
$final_projects = array();
foreach ($projects as $project) {
if (!$project->isArchived()) {
$final_projects[] = $project;
}
}
$this->projects = $final_projects;
$this->users = $this->team->getMembers();
} catch (\Exception $e) {
framework\Logging::log($e->getMessage(), 'core', framework\Logging::LEVEL_WARNING);
return $this->return404(framework\Context::getI18n()->__('This team does not exist'));
}
}