本文整理匯總了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();
}