original_string: protected function section_edit_controls($course, $section, $onsectionpage = false) {
          global $PAGE;
  
          if (!$PAGE->user_is_editing()) {
              return array();
          }
  
          $controls = array();
          $items = $this->section_edit_control_items($course, $section, $onsectionpage);
  
          foreach ($items as $key => $item) {
                  $url = empty($item['url']) ? '' : $item['url'];
                  $icon = empty($item['icon']) ? '' : $item['icon'];
                  $name = empty($item['name']) ? '' : $item['name'];
                  $attr = empty($item['attr']) ? '' : $item['attr'];
                  $class = empty($item['pixattr']['class']) ? '' : $item['pixattr']['class'];
                  $alt = empty($item['pixattr']['alt']) ? '' : $item['pixattr']['alt'];
                  $controls[$key] = html_writer::link(
                      new moodle_url($url), $this->output->pix_icon($icon, $alt),
                      $attr);
          }
  
          debugging('section_edit_controls() is deprecated, please use section_edit_control_items() instead.', DEBUG_DEVELOPER);
          return $controls;
      }
code: protected function section_edit_controls($course, $section, $onsectionpage = false) {
          global $PAGE;
  
          if (!$PAGE->user_is_editing()) {
              return array();
          }
  
          $controls = array();
          $items = $this->section_edit_control_items($course, $section, $onsectionpage);
  
          foreach ($items as $key => $item) {
                  $url = empty($item['url']) ? '' : $item['url'];
                  $icon = empty($item['icon']) ? '' : $item['icon'];
                  $name = empty($item['name']) ? '' : $item['name'];
                  $attr = empty($item['attr']) ? '' : $item['attr'];
                  $class = empty($item['pixattr']['class']) ? '' : $item['pixattr']['class'];
                  $alt = empty($item['pixattr']['alt']) ? '' : $item['pixattr']['alt'];
                  $controls[$key] = html_writer::link(
                      new moodle_url($url), $this->output->pix_icon($icon, $alt),
                      $attr);
          }
  
          debugging('section_edit_controls() is deprecated, please use section_edit_control_items() instead.', DEBUG_DEVELOPER);
          return $controls;
      }
code_tokens: protected function section_edit_controls ( $ course , $ section , $ onsectionpage = false ) { global $ PAGE ; if ( ! $ PAGE -> user_is_editing ( ) ) { return array ( ) ; } $ controls = array ( ) ; $ items = $ this -> section_edit_control_items ( $ course , $ section , $ onsectionpage ) ; foreach ( $ items as $ key => $ item ) { $ url = empty ( $ item [ 'url' ] ) ? '' : $ item [ 'url' ] ; $ icon = empty ( $ item [ 'icon' ] ) ? '' : $ item [ 'icon' ] ; $ name = empty ( $ item [ 'name' ] ) ? '' : $ item [ 'name' ] ; $ attr = empty ( $ item [ 'attr' ] ) ? '' : $ item [ 'attr' ] ; $ class = empty ( $ item [ 'pixattr' ] [ 'class' ] ) ? '' : $ item [ 'pixattr' ] [ 'class' ] ; $ alt = empty ( $ item [ 'pixattr' ] [ 'alt' ] ) ? '' : $ item [ 'pixattr' ] [ 'alt' ] ; $ controls [ $ key ] = html_writer :: link ( new moodle_url ( $ url ) , $ this -> output -> pix_icon ( $ icon , $ alt ) , $ attr ) ; } debugging ( 'section_edit_controls() is deprecated, please use section_edit_control_items() instead.' , DEBUG_DEVELOPER ) ; return $ controls ; }
docstring: Generate the edit controls of a section
  
  @param stdClass $course The course entry from DB
  @param stdClass $section The course_section entry from DB
  @param bool $onsectionpage true if being printed on a section page
  @return array of links with edit controls
  @deprecated since Moodle 3.0 MDL-48947 - please do not use this function any more.
  @see format_section_renderer_base::section_edit_control_items()
docstring_tokens: Generate the edit controls of a section