本文整理汇总了PHP中JHtmlSidebar::getEntries方法的典型用法代码示例。如果您正苦于以下问题:PHP JHtmlSidebar::getEntries方法的具体用法?PHP JHtmlSidebar::getEntries怎么用?PHP JHtmlSidebar::getEntries使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JHtmlSidebar
的用法示例。
在下文中一共展示了JHtmlSidebar::getEntries方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: postRender
/**
* Echoes any HTML to show after the view template
*
* @param string $view The current view
* @param string $task The current task
* @param FOFInput $input The input array (request parameters)
* @param array $config The view configuration array
*
* @return void
*/
public function postRender($view, $task, $input, $config = array())
{
$format = $input->getCmd('format', 'html');
if ($format != 'html' || FOFPlatform::getInstance()->isCli()) {
return;
}
if (!FOFPlatform::getInstance()->isCli() && FOFPlatform::getInstance()->checkVersion(JVERSION, '3.0', 'ge')) {
$sidebarEntries = JHtmlSidebar::getEntries();
if (!empty($sidebarEntries)) {
echo '</div>';
}
}
echo "</div>\n";
echo "</div>\n";
}
示例3: getOptions
protected function getOptions()
{
$options = parent::getOptions();
foreach (JHtmlSidebar::getEntries() as $entry) {
if (strpos($entry[1], 'com_categories') === false) {
continue;
}
$uri = JUri::getInstance($entry[1]);
$extension = $uri->getVar('extension');
if ($extension) {
$options[] = JHtml::_('select.option', $extension . '.category', JText::_('JCategory'));
}
}
return $options;
}
示例4: postRender
/**
* Echoes any HTML to show after the view template
*
* @param string $view The current view
* @param string $task The current task
* @param array $input The input array (request parameters)
*/
public function postRender($view, $task, $input, $config = array())
{
list($isCli, ) = FOFDispatcher::isCliAdmin();
$format = $input->getCmd('format', 'html');
if ($format != 'html' || $isCli) {
return;
}
if (!$isCli && version_compare(JVERSION, '3.0.0', 'ge')) {
$sidebarEntries = JHtmlSidebar::getEntries();
if (!empty($sidebarEntries)) {
echo '</div>';
}
}
echo "</div>\n";
echo "</div>\n";
}
示例5: 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();
}
示例6: postRender
/**
* Echoes any HTML to show after the view template
*
* @param string $view The current view
* @param string $task The current task
* @param FOFInput $input The input array (request parameters)
* @param array $config The view configuration array
*
* @return void
*/
public function postRender($view, $task, $input, $config = array())
{
$format = $input->getCmd('format', 'html');
if ($format != 'html' || FOFPlatform::getInstance()->isCli()) {
return;
}
if (!FOFPlatform::getInstance()->isCli() && version_compare(JVERSION, '3.0', 'ge')) {
$sidebarEntries = JHtmlSidebar::getEntries();
if (!empty($sidebarEntries)) {
echo '</div>';
}
}
echo "</div>\n";
// Closes row-fluid div
echo "</div>\n";
// Closes akeeba-bootstrap div
echo "</div>\n";
// Closes joomla-version div
}
示例7: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = JHelperContent::getActions('com_modules');
$user = JFactory::getUser();
// Get the toolbar object instance
$bar = JToolbar::getInstance('toolbar');
if ($state->get('client_id') == 1) {
JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES_ADMIN'), 'cube module');
} else {
JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES_SITE'), 'cube module');
}
if ($canDo->get('core.create')) {
// Instantiate a new JLayoutFile instance and render the layout
$layout = new JLayoutFile('toolbar.newmodule');
$bar->appendButton('Custom', $layout->render(array()), 'new');
}
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('module.edit');
}
if ($canDo->get('core.create')) {
JToolbarHelper::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::checkin('modules.checkin');
}
// Add a batch button
if ($user->authorise('core.create', 'com_modules') && $user->authorise('core.edit', 'com_modules') && $user->authorise('core.edit.state', 'com_modules')) {
JHtml::_('bootstrap.modal', 'collapseModal');
$title = JText::_('JTOOLBAR_BATCH');
// Instantiate a new JLayoutFile instance and render the batch button
$layout = new JLayoutFile('joomla.toolbar.batch');
$dhtml = $layout->render(array('title' => $title));
$bar->appendButton('Custom', $dhtml, 'batch');
}
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('modules.trash');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_modules');
}
JToolbarHelper::help('JHELP_EXTENSIONS_MODULE_MANAGER');
if (JHtmlSidebar::getEntries()) {
$this->sidebar = JHtmlSidebar::render();
}
}
示例8: defined
<?php
/**
* @package Windwalker.Framework
* @subpackage Layouts
*
* @copyright Copyright (C) 2012 Asikart. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Generated by AKHelper - http://asikart.com
*/
// no direct access
defined('_JEXEC') or die;
if (JVERSION >= 3) {
$list = JHtmlSidebar::getEntries();
} else {
include_once JPATH_ADMINISTRATOR . '/modules/mod_submenu/helper.php';
$list = modSubMenuHelper::getItems();
}
$displayMenu = count($list);
$hide = JFactory::getApplication()->input->getBool('hidemainmenu');
if ($hide) {
$displayMenu = false;
}
?>
<?php
if (JVERSION >= 3) {
?>
<div id="ak-submenu">
<?php
if ($displayMenu) {
示例9: postRender
/**
* Echoes any HTML to show after the view template
*
* @param string $view The current view
* @param string $task The current task
*
* @return void
*/
public function postRender($view, $task)
{
$input = $this->container->input;
$platform = $this->container->platform;
$format = $input->getCmd('format', 'html');
if ($format != 'html' || $platform->isCli()) {
return;
}
$sidebarEntries = \JHtmlSidebar::getEntries();
if (!empty($sidebarEntries)) {
echo '</div>';
}
echo "</div>\n";
// Closes row-fluid div
echo "</div>\n";
// Closes akeeba-bootstrap div
echo "</div>\n";
// Closes joomla-version div
}