Source for file newsfeed.php
Documentation is available at newsfeed.php
* @package Joomla.Administrator
* @subpackage com_newsfeeds
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Newsfeed controller class.
* @package Joomla.Administrator
* @subpackage com_newsfeeds
* Method override to check if you can add a new record.
* @param array $data An array of input data.
protected function allowAdd($data =
array())
// 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 to check if you can edit a 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 object $model The model.
* @return boolean True if successful, false otherwise and internal error is set.
public function batch($model =
null)
$model =
$this->getModel('Newsfeed', '', array());
return parent::batch($model);
* Function that allows child controller access to model data after the data has been saved.
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
protected function postSaveHook(JModelLegacy $model, $validData =
array())
Documentation generated on Tue, 19 Nov 2013 15:09:27 +0100 by phpDocumentor 1.4.3