本文整理汇总了PHP中TBGSettings::isFrontpageProjectListVisible方法的典型用法代码示例。如果您正苦于以下问题:PHP TBGSettings::isFrontpageProjectListVisible方法的具体用法?PHP TBGSettings::isFrontpageProjectListVisible怎么用?PHP TBGSettings::isFrontpageProjectListVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBGSettings
的用法示例。
在下文中一共展示了TBGSettings::isFrontpageProjectListVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runIndex
/**
* Frontpage
*
* @param TBGRequest $request
*/
public function runIndex(TBGRequest $request)
{
if (TBGSettings::isSingleProjectTracker()) {
if (($projects = TBGProject::getAllRootProjects(false)) && ($project = array_shift($projects))) {
$this->forward(TBGContext::getRouting()->generate('project_dashboard', array('project_key' => $project->getKey())));
}
}
$this->forward403unless($this->getUser()->hasPageAccess('home'));
$this->links = TBGContext::getMainLinks();
$this->show_project_list = TBGSettings::isFrontpageProjectListVisible();
$this->show_project_config_link = $this->getUser()->canAccessConfigurationPage(TBGSettings::CONFIGURATION_SECTION_PROJECTS);
if ($this->show_project_list || $this->show_project_config_link) {
$projects = TBGProject::getAllRootProjects(false);
foreach ($projects as $k => $project) {
if (!$project->hasAccess()) {
unset($projects[$k]);
}
}
$this->projects = $projects;
$this->project_count = count($this->projects);
}
}
示例2: __
disabled<?php
}
?>
>
<option value=1<?php
if (TBGSettings::isFrontpageProjectListVisible()) {
?>
selected<?php
}
?>
><?php
echo __('Yes');
?>
</option>
<option value=0<?php
if (!TBGSettings::isFrontpageProjectListVisible()) {
?>
selected<?php
}
?>
><?php
echo __('No');
?>
</option>
</select>
</td>
</tr>
<tr>
<td class="config_explanation" colspan="2"><?php
echo __('Whether the project overview list should appear on the frontpage or not');
?>