コード例 #1
0
 /**
  * Initializes the default configuration for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param 	object 	An optional KConfig object with configuration options.
  * @return void
  */
 protected function _initialize(KConfig $config)
 {
     /* 
      * Disable controller persistency on non-HTTP requests, e.g. AJAX, and requests containing 
      * the tmpl variable set to component, e.g. requests using modal boxes. This avoids 
      * changing the model state session variable of the requested model, which is often 
      * undesirable under these circumstances. 
      */
     $config->append(array('persistable' => KRequest::type() == 'HTTP' && KRequest::get('get.tmpl', 'cmd') != 'component', 'limit' => array('max' => 100, 'default' => JFactory::getApplication()->getCfg('list_limit'))));
     parent::_initialize($config);
 }
コード例 #2
0
ファイル: default.php プロジェクト: raeldc/com_learn
	/**
     * Initializes the default configuration for the object
     *
     * Called from {@link __construct()} as a first step of object instantiation.
     *
     * @param 	object 	An optional KConfig object with configuration options.
     * @return void
     */
    protected function _initialize(KConfig $config)
    {
    	/* 
         * Disable controller persistency on non-HTTP requests, e.g. AJAX, and requests containing 
         * the tmpl variable set to component, e.g. requests using modal boxes. This avoids 
         * changing the model state session variable of the requested model, which is often 
         * undesirable under these circumstances. 
         */  
        
        $config->append(array(
    		'persistable'  => (KRequest::type() == 'HTTP' && KRequest::get('get.tmpl','cmd') != 'component'),
            //'behaviors'  =>  array('cacheable')
        ));

        parent::_initialize($config);
    }
コード例 #3
0
 /**
  * Initializes the default configuration for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param 	object 	An optional KConfig object with configuration options.
  * @return void
  */
 protected function _initialize(KConfig $config)
 {
     $config->append(array('limit' => array('max' => 100, 'default' => JFactory::getApplication()->getCfg('list_limit'))));
     parent::_initialize($config);
 }