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