original_string: public function list_block_contents($icons, $items) {
          $row = 0;
          $lis = array();
          foreach ($items as $key => $string) {
              $item = html_writer::start_tag('li', array('class' => 'r' . $row));
              if (!empty($icons[$key])) { //test if the content has an assigned icon
                  $item .= html_writer::tag('div', $icons[$key], array('class' => 'icon column c0'));
              }
              $item .= html_writer::tag('div', $string, array('class' => 'column c1'));
              $item .= html_writer::end_tag('li');
              $lis[] = $item;
              $row = 1 - $row; // Flip even/odd.
          }
          return html_writer::tag('ul', implode("\n", $lis), array('class' => 'unlist'));
      }
code: public function list_block_contents($icons, $items) {
          $row = 0;
          $lis = array();
          foreach ($items as $key => $string) {
              $item = html_writer::start_tag('li', array('class' => 'r' . $row));
              if (!empty($icons[$key])) { //test if the content has an assigned icon
                  $item .= html_writer::tag('div', $icons[$key], array('class' => 'icon column c0'));
              }
              $item .= html_writer::tag('div', $string, array('class' => 'column c1'));
              $item .= html_writer::end_tag('li');
              $lis[] = $item;
              $row = 1 - $row; // Flip even/odd.
          }
          return html_writer::tag('ul', implode("\n", $lis), array('class' => 'unlist'));
      }
code_tokens: public function list_block_contents ( $ icons , $ items ) { $ row = 0 ; $ lis = array ( ) ; foreach ( $ items as $ key => $ string ) { $ item = html_writer :: start_tag ( 'li' , array ( 'class' => 'r' . $ row ) ) ; if ( ! empty ( $ icons [ $ key ] ) ) { //test if the content has an assigned icon $ item .= html_writer :: tag ( 'div' , $ icons [ $ key ] , array ( 'class' => 'icon column c0' ) ) ; } $ item .= html_writer :: tag ( 'div' , $ string , array ( 'class' => 'column c1' ) ) ; $ item .= html_writer :: end_tag ( 'li' ) ; $ lis [ ] = $ item ; $ row = 1 - $ row ; // Flip even/odd. } return html_writer :: tag ( 'ul' , implode ( "\n" , $ lis ) , array ( 'class' => 'unlist' ) ) ; }
docstring: Render the contents of a block_list.
  
  @param array $icons the icon for each item.
  @param array $items the content of each item.
  @return string HTML
docstring_tokens: Render the contents of a block_list .