/** * Constructor * * @param object An optional KConfig object with configuration options. */ public function __construct(KConfig $config) { parent::__construct($config); if (KRequest::get('get.action', 'cmd') == 'update') { $this->setAction('update'); } }
public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback('before.edit', array($this, 'sanitizeData'))->registerCallback('before.add', array($this, 'sanitizeData'))->registerCallback('after.add', array($this, 'notify'))->registerCallback('after.save', array($this, 'redirect'))->registerCallback('after.read', array($this, 'activate')); // Force view to singular since we don't have a users view $this->_view = 'user'; }
public function __construct(KConfig $config) { parent::__construct($config); // TODO To be removed as soon as the problem with language files loading on HMVC calls is solved JFactory::getLanguage()->load('com_activities', JPATH_ADMINISTRATOR); $this->registerCallback('before.add', array($this, 'setIp')); }
public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback('before.add', array($this, 'beforeAdd')); $this->registerCallback('after.add', array($this, 'afterAdd')); $this->registerCallback('after.save', array($this, 'afterSave')); }
public function __construct(KConfig $config) { //show only enabled posts in the posts view if (KInflector::isPlural(KRequest::get('get.view', 'string'))) { $config->request->enabled = 1; } parent::__construct($config); }
/** * Constructor * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { $config->persistent = false; parent::__construct($config); // Register apis Jloader::register('JInstaller', JPATH_LIBRARIES . '/joomla/installer/installer.php'); Jloader::register('JArchive', JPATH_LIBRARIES . '/joomla/filesystem/archive.php'); Jloader::register('JFile', JPATH_LIBRARIES . '/joomla/filesystem/file.php'); }
public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback('after.add', array($this, 'notify')); //Lock the referrer to prevent it from being overridden for read requests if ($this->isDispatched() && KRequest::type() == 'HTTP') { if ($this->isEditable()) { $this->registerCallback('after.logout', array($this, 'lockReferrer')); } } }
public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback(array('after.save', 'after.delete'), array($this, 'setStatusMessage')); $this->registerCallback(array('before.add', 'before.edit'), array($this, 'checkSubmittedFolder')); $this->registerCallback('after.read', array($this, 'prepopulateCategory')); $this->registerCallback('before.get', array($this, 'checkDownloadLink')); $this->registerCallback('after.apply', array($this, 'setRedirectAfterApply')); $this->registerCallback('after.delete', array($this, 'setRedirectAfterDelete')); }
/** * Constructor * * @param array An optional associative array of configuration settings. */ public function __construct(KConfig $config) { parent::__construct($config); //Wether or not to json encode result $this->_auto_json_result = $config->auto_json_result; // Register extra actions $this->registerActionAlias('disable', 'enable'); //Register redirect messages $this->registerCallback(array('after.add', 'after.apply', 'after.edit', 'after.enable', 'after.disable'), array($this, 'setMessage')); if (KRequest::type() == 'FLASH') { KRequest::set('post.action', KRequest::get('get.action', 'cmd')); } }
public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback('after.add', array($this, 'notify')); }
/** * Constructor * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback(array('before.apply', 'before.save'), array($this, 'uploadIcon')); }
public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback('after.edit', array($this, 'purgeCache')); }
public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback('before.get', array($this, 'beforeGet')); $this->registerCallback('before.add', array($this, 'beforeAdd')); }
public function __construct(KConfig $config) { parent::__construct($config); $this->addBehavior('com://admin/activities.controller.behavior.loggable'); }
public function __construct(KConfig $config) { parent::__construct($config); $this->addBehavior('com://admin/attachments.controller.behavior.attachable')->addBehavior('com://admin/news.controller.behavior.loggable'); $this->registerCallback('after.save', array($this, 'afterSave')); }
public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback('before.delete', array($this, 'beforeDelete')); }
public function __construct(KConfig $config) { parent::__construct($config); $this->addBehavior('com://admin/attachments.controller.behavior.attachable'); }