* @copyright Copyright © 2006 Peter Adams * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0 * @category owa * @package owa * @version $Revision$ * @since owa 1.0.0 */ class owa_reportController extends owa_adminController { /** * Constructor * * @param array $params * @return */ function __construct($params) { $this->setControllerType('report'); $this->_setCapability('view_reports'); return parent::__construct($params); } /** * pre action * */ function pre() { // pass full set of params to view $this->data['params'] = $this->params; // set default period if necessary if (empty($this->params['period'])) { $this->params['period'] = 'last_seven_days'; $this->set('is_default_period', true); } $this->setPeriod($this->getParam('period')); $this->setView('base.report'); $this->setViewMethod('delegate'); $this->dom_id = str_replace('.', '-', $this->params['do']); $this->data['dom_id'] = $this->dom_id; $this->data['do'] = $this->params['do']; return; } function post() { return; } function setTitle($title, $suffix = '') { $this->set('title', $title); $this->set('titleSuffix', $suffix); } } ?>