Exemple #1
0
 /**
  * JModelLegacy override to add alternating value for $odd
  *
  * @param   string   $query       The query.
  * @param   integer  $limitstart  Offset.
  * @param   integer  $limit       The number of records.
  *
  * @return  array  An array of results.
  *
  * @since   12.2
  * @throws  RuntimeException
  */
 protected function _getList($query, $limitstart = 0, $limit = 0)
 {
     $result = parent::_getList($query, $limitstart, $limit);
     $odd = 1;
     foreach ($result as $k => $row) {
         $result[$k]->odd = $odd;
         $odd = 1 - $odd;
     }
     return $result;
 }