/** * Constructor * * @param object An optional KConfig object with configuration options. */ public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback('before.read', array($this, 'saveReferrer')); $this->registerCallback('before.browse', array($this, 'saveReferrer')); $this->registerCallback('after.read', array($this, 'lockRow')); $this->registerCallback('after.edit', array($this, 'unlockRow')); $this->registerCallback('after.cancel', array($this, 'unlockRow')); //Set default redirect $this->_redirect = KRequest::referrer(); }
/** * Constructor. * * @param KObjectConfig $config Configuration options. */ public function __construct(KObjectConfig $config) { parent::__construct($config); $translator = $this->getObject('translator'); $catalogue = $translator->getCatalogue(); if ($length = $catalogue->getConfig()->key_length) { $catalogue->getConfig()->key_length = false; } $translator->load('com:activities'); if ($length) { $catalogue->getConfig()->key_length = $length; } }