original_string: public function renderRows()
      {
          $this->odd_even = null;
          $this->total_rows = 0;
          $this->template->del($this->container_tag);
  
          // render data rows
          $iter = $this->getIterator();
          foreach ($iter as $this->current_id => $this->current_row) {
              if ($this->current_row instanceof Model || $this->current_row instanceof \atk4\data\Model) {
                  $this->current_row = (array) $this->current_row->get();
              } elseif (!is_array($this->current_row) && !($this->current_row instanceof ArrayAccess)) {
                  // Looks like we won't be abel to access current_row as array, so we will
                  // copy it's value inside $this->current instead and produce an empty array
                  // to be filled out by a custom iterators
                  $this->current = $this->current_row;
                  $this->current_row = get_object_vars($this->current);
              }
  
              $this->current_row_html = array();
  
              if (!empty($this->sep_html) && $this->total_rows) {
                  $this->renderSeparator();
              }
  
              // calculate rows so far
              ++$this->total_rows;
  
              // if onRender totals enabled, then update totals
              if ($this->totals_type == 'onRender') {
                  $this->updateTotals();
              }
  
              // render data row
              $this->renderDataRow();
          }
  
          // calculate grand totals if needed
          if ($this->totals_type == 'onRequest') {
              $this->updateGrandTotals();
          }
  
          // set total row count
          $this->totals['row_count'] = $this->total_rows;
  
          // render totals row
          $this->renderTotalsRow();
      }
code: public function renderRows()
      {
          $this->odd_even = null;
          $this->total_rows = 0;
          $this->template->del($this->container_tag);
  
          // render data rows
          $iter = $this->getIterator();
          foreach ($iter as $this->current_id => $this->current_row) {
              if ($this->current_row instanceof Model || $this->current_row instanceof \atk4\data\Model) {
                  $this->current_row = (array) $this->current_row->get();
              } elseif (!is_array($this->current_row) && !($this->current_row instanceof ArrayAccess)) {
                  // Looks like we won't be abel to access current_row as array, so we will
                  // copy it's value inside $this->current instead and produce an empty array
                  // to be filled out by a custom iterators
                  $this->current = $this->current_row;
                  $this->current_row = get_object_vars($this->current);
              }
  
              $this->current_row_html = array();
  
              if (!empty($this->sep_html) && $this->total_rows) {
                  $this->renderSeparator();
              }
  
              // calculate rows so far
              ++$this->total_rows;
  
              // if onRender totals enabled, then update totals
              if ($this->totals_type == 'onRender') {
                  $this->updateTotals();
              }
  
              // render data row
              $this->renderDataRow();
          }
  
          // calculate grand totals if needed
          if ($this->totals_type == 'onRequest') {
              $this->updateGrandTotals();
          }
  
          // set total row count
          $this->totals['row_count'] = $this->total_rows;
  
          // render totals row
          $this->renderTotalsRow();
      }
code_tokens: public function renderRows ( ) { $ this -> odd_even = null ; $ this -> total_rows = 0 ; $ this -> template -> del ( $ this -> container_tag ) ; // render data rows $ iter = $ this -> getIterator ( ) ; foreach ( $ iter as $ this -> current_id => $ this -> current_row ) { if ( $ this -> current_row instanceof Model || $ this -> current_row instanceof \ atk4 \ data \ Model ) { $ this -> current_row = ( array ) $ this -> current_row -> get ( ) ; } elseif ( ! is_array ( $ this -> current_row ) && ! ( $ this -> current_row instanceof ArrayAccess ) ) { // Looks like we won't be abel to access current_row as array, so we will // copy it's value inside $this->current instead and produce an empty array // to be filled out by a custom iterators $ this -> current = $ this -> current_row ; $ this -> current_row = get_object_vars ( $ this -> current ) ; } $ this -> current_row_html = array ( ) ; if ( ! empty ( $ this -> sep_html ) && $ this -> total_rows ) { $ this -> renderSeparator ( ) ; } // calculate rows so far ++ $ this -> total_rows ; // if onRender totals enabled, then update totals if ( $ this -> totals_type == 'onRender' ) { $ this -> updateTotals ( ) ; } // render data row $ this -> renderDataRow ( ) ; } // calculate grand totals if needed if ( $ this -> totals_type == 'onRequest' ) { $ this -> updateGrandTotals ( ) ; } // set total row count $ this -> totals [ 'row_count' ] = $ this -> total_rows ; // render totals row $ this -> renderTotalsRow ( ) ; }
docstring: Render lister rows.
docstring_tokens: Render lister rows .