/** * Constructor * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $options) { parent::__construct($options); $this->registerActionAlias('add', 'edit')->registerActionAlias('apply', 'save'); //Workaround for #269 $this->_request->layout = 'default'; }
/** * Constructor * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { $config->append(array('request' => array('sort' => 'path_sort_ordering', 'enabled' => ''))); parent::__construct($config); $this->registerCallback('after.add', array($this, 'setPermissions'))->registerCallback('after.edit', array($this, 'setPermissions')); KFactory::get('admin::com.ninjaboard.controller.maintenance')->forums(); }
/** * Constructor * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $options) { parent::__construct($options); $this->registerCallback('before.add', array($this, 'setTitle'))->registerCallback('before.edit', array($this, 'setTitle'))->registerCallback('after.add', array($this, 'setPermissions'))->registerCallback('after.edit', array($this, 'setPermissions')); $showReminder = KFactory::get('admin::com.ninja.helper.default')->formid('show-reminder'); if (!KRequest::has('cookie.' . $showReminder) && $this->getModel()->getTotal() > 0) { $this->registerCallback('after.browse', array($this, 'showReminder')); } }
/** * Generic method to set model states * * @return KDatabaseRow A row object containing the filtered data */ protected function _setModelState() { parent::_setModelState(); if ($group = KRequest::get('get.f.usergroup', 'int')) { $this->getModel()->setState('usergroup', $group); } return $this; }