本文整理汇总了PHP中thebuggenie\core\entities\Project::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Project::getAll方法的具体用法?PHP Project::getAll怎么用?PHP Project::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thebuggenie\core\entities\Project
的用法示例。
在下文中一共展示了Project::getAll方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runListProjects
public function runListProjects(framework\Request $request)
{
$projects = entities\Project::getAll();
$return_array = array();
foreach ($projects as $project) {
$return_array[$project->getKey()] = $project->getName();
}
$this->projects = $return_array;
}
示例2: __
">
<input type="search" name="articlename" placeholder="<?php
echo $quicksearch_title;
?>
">
</form>
</div>
<?php
if (count(\thebuggenie\core\entities\Project::getAll()) > (int) \thebuggenie\core\framework\Context::isProjectContext()) {
?>
<div class="header"><?php
echo __('Project wikis');
?>
</div>
<?php
foreach (\thebuggenie\core\entities\Project::getAll() as $project) {
?>
<?php
if (!$project->hasAccess() || isset($project_url) && $project->getID() == \thebuggenie\core\framework\Context::getCurrentProject()->getID()) {
continue;
}
?>
<?php
if (!$project->hasWikiURL()) {
?>
<?php
echo link_tag(make_url('publish_article', array('article_name' => ucfirst($project->getKey()) . ':MainPage')), $project->getName());
?>
<?php
} else {
?>
示例3: getAvailableValues
public function getAvailableValues()
{
switch ($this->getFilterKey()) {
case 'issuetype':
return framework\Context::isProjectContext() ? framework\Context::getCurrentProject()->getIssuetypeScheme()->getIssuetypes() : Issuetype::getAll();
case 'status':
return Status::getAll();
case 'category':
return Category::getAll();
case 'priority':
return Priority::getAll();
case 'severity':
return Severity::getAll();
case 'reproducability':
return Reproducability::getAll();
case 'resolution':
return Resolution::getAll();
case 'project_id':
return \thebuggenie\core\entities\Project::getAll();
case 'build':
return $this->_getAvailableBuildChoices();
case 'component':
return $this->_getAvailableComponentChoices();
case 'edition':
return $this->_getAvailableEditionChoices();
case 'milestone':
return $this->_getAvailableMilestoneChoices();
case 'subprojects':
$filters = array();
$projects = Project::getIncludingAllSubprojectsAsArray(framework\Context::getCurrentProject());
foreach ($projects as $project) {
if ($project->getID() == framework\Context::getCurrentProject()->getID()) {
continue;
}
$filters[$project->getID()] = $project;
}
return $filters;
case 'owner_user':
case 'assignee_user':
case 'posted_by':
return $this->_getAvailableUserChoices();
case 'owner_team':
case 'assignee_team':
return $this->_getAvailableTeamChoices();
default:
$customdatatype = CustomDatatype::getByKey($this->getFilterKey());
if ($customdatatype instanceof \thebuggenie\core\entities\CustomDatatype && $customdatatype->hasCustomOptions()) {
return $customdatatype->getOptions();
} else {
switch ($this->getFilterType()) {
case CustomDatatype::COMPONENTS_CHOICE:
return $this->_getAvailableComponentChoices();
case CustomDatatype::RELEASES_CHOICE:
return $this->_getAvailableBuildChoices();
case CustomDatatype::EDITIONS_CHOICE:
return $this->_getAvailableEditionChoices();
case CustomDatatype::MILESTONE_CHOICE:
return $this->_getAvailableMilestoneChoices();
case CustomDatatype::USER_CHOICE:
return $this->_getAvailableUserChoices();
case CustomDatatype::TEAM_CHOICE:
return $this->_getAvailableTeamChoices();
case CustomDatatype::CLIENT_CHOICE:
return $this->_getAvailableClientChoices();
case CustomDatatype::STATUS_CHOICE:
return Status::getAll();
default:
return array();
}
}
}
}
示例4: __
echo __('Yes, behave as tracker for a single project');
?>
</option>
<option value=0<?php
if (!\thebuggenie\core\framework\Settings::isSingleProjectTracker()) {
?>
selected<?php
}
?>
><?php
echo __('No, use regular index page');
?>
</option>
</select>
<?php
echo config_explanation(__('In single project tracker mode, The Bug Genie will display the homepage for the first project as the main page instead of the regular index page') . "<br>" . (count(\thebuggenie\core\entities\Project::getAll()) > 1 ? '<br><b class="more_than_one_project_warning">' . __('More than one project exists. When in "single project" mode, accessing other projects than the first will become harder.') . '</b>' : ''));
?>
</td>
</tr>
<tr>
<td><label for="showprojectsoverview"><?php
echo __('Show project list on frontpage');
?>
</label></td>
<td>
<select name="<?php
echo \thebuggenie\core\framework\Settings::SETTING_SHOW_PROJECTS_OVERVIEW;
?>
" id="showprojectsoverview" style="width: 300px;"<?php
if ($access_level != \thebuggenie\core\framework\Settings::ACCESS_FULL) {
?>
示例5: runFilterGetDynamicChoices
public function runFilterGetDynamicChoices(framework\Request $request)
{
$subproject_ids = explode(',', $request['subprojects']);
$existing_ids = $request['existing_ids'];
$results = array();
$projects = $request['project_id'] != '' ? entities\Project::getAllByIDs(explode(',', $request['project_id'])) : entities\Project::getAll();
$items = array('build' => array(), 'edition' => array(), 'component' => array(), 'milestone' => array());
foreach ($projects as $project) {
foreach ($project->getBuilds() as $build) {
$items['build'][$build->getID()] = $build;
}
foreach ($project->getEditions() as $edition) {
$items['edition'][$edition->getID()] = $edition;
}
foreach ($project->getComponents() as $component) {
$items['component'][$component->getID()] = $component;
}
foreach ($project->getMilestones() as $milestone) {
$items['milestone'][$milestone->getID()] = $milestone;
}
}
$filters = array();
$filters['build'] = entities\SearchFilter::createFilter('build');
$filters['edition'] = entities\SearchFilter::createFilter('edition');
$filters['component'] = entities\SearchFilter::createFilter('component');
$filters['milestone'] = entities\SearchFilter::createFilter('milestone');
if (isset($existing_ids['build'])) {
foreach (tables\Builds::getTable()->getByIDs($existing_ids['build']) as $build) {
$items['build'][$build->getID()] = $build;
}
$filters['build']->setValue(join(',', $existing_ids['build']));
}
if (isset($existing_ids['edition'])) {
foreach (tables\Editions::getTable()->getByIDs($existing_ids['edition']) as $edition) {
$items['edition'][$edition->getID()] = $edition;
}
$filters['edition']->setValue(join(',', $existing_ids['edition']));
}
if (isset($existing_ids['component'])) {
foreach (tables\Components::getTable()->getByIDs($existing_ids['component']) as $component) {
$items['component'][$component->getID()] = $component;
}
$filters['component']->setValue(join(',', $existing_ids['component']));
}
if (isset($existing_ids['milestone'])) {
foreach (tables\Milestones::getTable()->getByIDs($existing_ids['milestone']) as $milestone) {
$items['milestone'][$milestone->getID()] = $milestone;
}
$filters['milestone']->setValue(join(',', $existing_ids['milestone']));
}
foreach (array('build', 'edition', 'component', 'milestone') as $k) {
$results[$k] = $this->getComponentHTML('search/interactivefilterdynamicchoicelist', array('filter' => $filters[$k], 'items' => $items[$k]));
}
return $this->renderJSON(compact('results'));
}