| Current Path : /var/www/consult-e-syn/public_html/components/com_ats/Controller/ |
| Current File : /var/www/consult-e-syn/public_html/components/com_ats/Controller/CannedReply.php |
<?php
/**
* @package ats
* @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace Akeeba\TicketSystem\Site\Controller;
defined('_JEXEC') or die;
use Akeeba\TicketSystem\Admin\Helper\Permissions;
use FOF40\Container\Container;
use FOF40\Controller\DataController;
class CannedReply extends DataController
{
public function __construct(Container $container, array $config = array())
{
$config['cacheableTasks'] = [];
parent::__construct($container, $config);
}
/**
* Browse is allowed only for managers
*
* @return bool
*/
protected function onBeforeBrowse()
{
$category = $this->input->getInt('category', 0);
$this->getModel()->orderBy('ordering', 'ASC');
return Permissions::isManager($category);
}
/**
* Read is allowed only for managers
*
* @return bool
*/
protected function onBeforeRead()
{
$category = $this->input->getInt('category', 0);
return Permissions::isManager($category);
}
/**
* Add not allowed on frontend
*
* @return bool
*/
protected function onBeforeAdd()
{
return false;
}
/**
* Save not allowed on frontend
*
* @return bool
*/
protected function onBeforeSave()
{
return false;
}
/**
* Edit not allowed on frontend
*
* @return bool
*/
protected function onBeforeEdit()
{
return false;
}
}