Source for file view.html.php
Documentation is available at view.html.php
* @package Joomla.Administrator
* @subpackage com_banners
* @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 banners.
* @package Joomla.Administrator
* @subpackage com_banners
* Method to display the view.
* @param string $tpl A template file to load. [optional]
* @return mixed A string if successful, otherwise a JError object.
public function display($tpl =
null)
$this->filterForm =
$this->get('FilterForm');
$this->activeFilters =
$this->get('ActiveFilters');
if (count($errors =
$this->get('Errors')))
require_once JPATH_COMPONENT .
'/models/fields/bannerclient.php';
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT .
'/helpers/html');
* Add the page title and toolbar.
require_once JPATH_COMPONENT .
'/helpers/banners.php';
// Get the toolbar object instance
$bar =
JToolBar::getInstance('toolbar');
if (count($user->getAuthorisedCategories('com_banners', 'core.create')) >
0)
if (($canDo->get('core.edit')))
if ($canDo->get('core.edit.state'))
if ($this->state->get('filter.state') !=
2)
if ($this->state->get('filter.state') != -
1)
if ($this->state->get('filter.state') !=
2)
elseif ($this->state->get('filter.state') ==
2)
if ($canDo->get('core.edit.state'))
if ($this->state->get('filter.state') == -
2 &&
$canDo->get('core.delete'))
elseif ($canDo->get('core.edit.state'))
if ($user->authorise('core.create', 'com_banners') &&
$user->authorise('core.edit', 'com_banners') &&
$user->authorise('core.edit.state', 'com_banners'))
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'))
* 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.state' =>
JText::_('JSTATUS'),
'a.name' =>
JText::_('COM_BANNERS_HEADING_NAME'),
'a.sticky' =>
JText::_('COM_BANNERS_HEADING_STICKY'),
'client_name' =>
JText::_('COM_BANNERS_HEADING_CLIENT'),
'impmade' =>
JText::_('COM_BANNERS_HEADING_IMPRESSIONS'),
'clicks' =>
JText::_('COM_BANNERS_HEADING_CLICKS'),
'a.language' =>
JText::_('JGRID_HEADING_LANGUAGE'),
'a.id' =>
JText::_('JGRID_HEADING_ID')
Documentation generated on Tue, 19 Nov 2013 15:17:48 +0100 by phpDocumentor 1.4.3