本文整理汇总了PHP中JHtmlSidebar::getFilters方法的典型用法代码示例。如果您正苦于以下问题:PHP JHtmlSidebar::getFilters方法的具体用法?PHP JHtmlSidebar::getFilters怎么用?PHP JHtmlSidebar::getFilters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JHtmlSidebar
的用法示例。
在下文中一共展示了JHtmlSidebar::getFilters方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderSidebar
public static function renderSidebar()
{
// Collect display data
$data = new stdClass();
$data->list = JHtmlSidebar::getEntries();
$data->filters = JHtmlSidebar::getFilters();
$data->action = JHtmlSidebar::getAction();
$data->displayMenu = count($data->list);
$data->displayFilters = count($data->filters);
$data->hide = JFactory::getApplication()->input->getBool('hidemainmenu');
// Create a layout object and ask it to render the sidebar
$layout = new JLayoutFile('sidebars.submenu');
$sidebarHtml = $layout->render($data);
return $sidebarHtml;
}
示例2: display
public function display($tpl = null)
{
if (version_compare(JVERSION, '3.0', 'ge')) {
$hide = JFactory::getApplication()->input->getBool('hidemainmenu', false);
$sidebar = count(JHtmlSidebar::getEntries()) + count(JHtmlSidebar::getFilters());
if (!$hide && $sidebar > 0) {
$start = array('<div id="j-sidebar-container" class="span2">', JHtmlSidebar::render(), '</div>', '<div id="j-main-container" class="span10">');
} else {
$start = array('<div id="j-main-container">');
}
echo join("\n", $start) . "\n";
parent::display($tpl);
echo "\n</div>";
} else {
parent::display($tpl);
}
$this->displayFooter();
}