Esempio n. 1
0
 /**
  * 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');
     }
 }
Esempio n. 2
0
 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';
 }
Esempio n. 3
0
 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'));
 }
Esempio n. 4
0
    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'));
    }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 /**
  * 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');
 }
Esempio n. 7
0
 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'));
         }
     }
 }
Esempio n. 8
0
    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'));
    }
Esempio n. 9
0
 /**
  * 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'));
     }
 }
Esempio n. 10
0
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->registerCallback('after.add', array($this, 'notify'));
 }
Esempio n. 11
0
 /**
  * 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'));
 }
Esempio n. 12
0
 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'));
 }
Esempio n. 14
0
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->addBehavior('com://admin/activities.controller.behavior.loggable');
 }
Esempio n. 15
0
 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'));
 }
Esempio n. 16
0
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->registerCallback('before.delete', array($this, 'beforeDelete'));
 }
Esempio n. 17
0
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->addBehavior('com://admin/attachments.controller.behavior.attachable');
 }