/**
  * Browse action
  *
  * Use the application default limit if no limit exists in the model and limit the
  * limit to a maximum.
  *
  * @param   KCommandContext A command context object
  * @return  KDatabaseRow(set)   A row(set) object containing the data to display
  */
 protected function _actionBrowse(KCommandContext $context)
 {
     if ($this->isDispatched()) {
         $limit = $this->getModel()->get('limit');
         //If limit is empty use default
         if (empty($limit)) {
             $limit = $this->_limit->default;
         }
         //Force the maximum limit
         if ($limit > $this->_limit->max) {
             $limit = $this->_limit->max;
         }
         $this->limit = $limit;
     }
     return parent::_actionBrowse($context);
 }
Example #2
0
 /**
  * Browse action
  * 
  * Use the application default limit if no limit exists in the model and limit the
  * limit to a maximum of 100.
  *
  * @param   KCommandContext A command context object
  * @return  KDatabaseRow(set)   A row(set) object containing the data to display
  */
 protected function _actionBrowse(KCommandContext $context)
 {
     if ($this->isDispatched()) {
         $limit = $this->getModel()->get('limit');
         //If limit is empty use default
         if (empty($limit)) {
             $limit = JFactory::getApplication()->getCfg('list_limit');
         }
         //Limit cannot be larger then 100
         if ($limit > 100) {
             $limit = 100;
         }
         $this->limit = $limit;
     }
     return parent::_actionBrowse($context);
 }