Example #1
0
 protected function populateState($ordering = 'ordering', $direction = 'asc')
 {
     $this->setState('project_id', TrackslibHelperTools::getCurrentProjectId());
     parent::populateState($ordering, $direction);
 }
Example #2
0
 /**
  * Method to auto-populate the model state.
  *
  * This method should only be called once per instantiation and is designed
  * to be called on the first call to the getState() method unless the model
  * configuration flag to ignore the request is set.
  *
  * Note. Calling getState in this method will result in recursion.
  *
  * @param   string  $ordering   An optional ordering field.
  * @param   string  $direction  An optional direction (asc|desc).
  *
  * @return  void
  *
  * @throws RuntimeException
  */
 protected function populateState($ordering = null, $direction = null)
 {
     $prid = JFactory::getApplication()->getUserStateFromRequest($this->context . '.projectround_id', 'projectround_id', 0, 'int');
     if (!$prid) {
         throw new RuntimeException('projectround id is required');
     }
     $this->setState('projectround_id', $prid);
     return parent::populateState($ordering, $direction);
 }