Source for file view.html.php
Documentation is available at view.html.php
* @package Joomla.Administrator
* @subpackage com_modules
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* View class for a list of modules.
* @package Joomla.Administrator
* @subpackage com_modules
public function display($tpl =
null)
if (count($errors =
$this->get('Errors')))
// Check if there are no matching items
JText::_('COM_MODULES_MSG_MANAGE_NO_MODULES'),
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT .
'/helpers/html');
* Add the page title and toolbar.
$state =
$this->get('State');
// Get the toolbar object instance
$bar =
JToolBar::getInstance('toolbar');
if ($canDo->get('core.create'))
// Instantiate a new JLayoutFile instance and render the layout
$bar->appendButton('Custom', $layout->render(array()), 'new');
if ($canDo->get('core.edit'))
if ($canDo->get('core.create'))
if ($canDo->get('core.edit.state'))
if ($state->get('filter.state') == -
2 &&
$canDo->get('core.delete'))
} elseif ($canDo->get('core.edit.state'))
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
$dhtml =
$layout->render(array('title' =>
$title));
$bar->appendButton('Custom', $dhtml, 'batch');
if ($canDo->get('core.admin'))
'index.php?option=com_modules&filter_client_id=0',
$this->state->get('filter.client_id') ==
0
'index.php?option=com_modules&filter_client_id=1',
$this->state->get('filter.client_id') ==
1
// @todo we need a label for this
JText::_('JOPTION_SELECT_PUBLISHED'),
JText::_('COM_MODULES_OPTION_SELECT_POSITION'),
JText::_('COM_MODULES_OPTION_SELECT_MODULE'),
JText::_('JOPTION_SELECT_ACCESS'),
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
JText::_('JOPTION_SELECT_LANGUAGE'),
JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'))
* Returns an array of fields the table can be sorted by
* @return array Array containing the field name to sort by as the key and display text as value
'ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
'a.published' =>
JText::_('JSTATUS'),
'a.title' =>
JText::_('JGLOBAL_TITLE'),
'position' =>
JText::_('COM_MODULES_HEADING_POSITION'),
'name' =>
JText::_('COM_MODULES_HEADING_MODULE'),
'pages' =>
JText::_('COM_MODULES_HEADING_PAGES'),
'a.access' =>
JText::_('JGRID_HEADING_ACCESS'),
'language_title' =>
JText::_('JGRID_HEADING_LANGUAGE'),
'a.id' =>
JText::_('JGRID_HEADING_ID')
Documentation generated on Tue, 19 Nov 2013 15:17:44 +0100 by phpDocumentor 1.4.3