Source for file banner.php
Documentation is available at banner.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
* Banner controller class.
* @package Joomla.Administrator
* @subpackage com_banners
* @var string The prefix to use with controller messages.
* Method override to check if you can add a new record.
* @param array $data An array of input data.
protected function allowAdd($data =
array())
$filter =
$this->input->getInt('filter_category_id');
// If the category has been passed in the URL check it.
$allow =
$user->authorise('core.create', $this->option .
'.category.' .
$categoryId);
// In the absence of better information, revert to the component permissions.
* Method override to check if you can edit an existing record.
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
protected function allowEdit($data =
array(), $key =
'id')
$recordId = (int) isset
($data[$key]) ?
$data[$key] :
0;
$categoryId = (int)
$this->getModel()->getItem($recordId)->catid;
// The category has been set. Check the category permissions.
return $user->authorise('core.edit', $this->option .
'.category.' .
$categoryId);
// Since there is no asset tracking, revert to the component permissions.
* Method to run batch operations.
* @param string $model The model
* @return boolean True on success.
public function batch($model =
null)
$model =
$this->getModel('Banner', '', array());
return parent::batch($model);
Documentation generated on Tue, 19 Nov 2013 14:54:17 +0100 by phpDocumentor 1.4.3