original_string: public function output_html($data, $query='') {
          global $OUTPUT;
  
          // The order matters very much because of the implied numeric keys.
          $days = array('sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday');
          $context = (object) [
              'name' => $this->get_full_name(),
              'id' => $this->get_id(),
              'days' => array_map(function($index) use ($days, $data) {
                  return [
                      'index' => $index,
                      'label' => get_string($days[$index], 'calendar'),
                      'checked' => in_array($index, $data)
                  ];
              }, array_keys($days))
          ];
  
          $element = $OUTPUT->render_from_template('core_admin/setting_special_calendar_weekend', $context);
  
          return format_admin_setting($this, $this->visiblename, $element, $this->description, false, '', NULL, $query);
  
      }
code: public function output_html($data, $query='') {
          global $OUTPUT;
  
          // The order matters very much because of the implied numeric keys.
          $days = array('sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday');
          $context = (object) [
              'name' => $this->get_full_name(),
              'id' => $this->get_id(),
              'days' => array_map(function($index) use ($days, $data) {
                  return [
                      'index' => $index,
                      'label' => get_string($days[$index], 'calendar'),
                      'checked' => in_array($index, $data)
                  ];
              }, array_keys($days))
          ];
  
          $element = $OUTPUT->render_from_template('core_admin/setting_special_calendar_weekend', $context);
  
          return format_admin_setting($this, $this->visiblename, $element, $this->description, false, '', NULL, $query);
  
      }
code_tokens: public function output_html ( $ data , $ query = '' ) { global $ OUTPUT ; // The order matters very much because of the implied numeric keys. $ days = array ( 'sunday' , 'monday' , 'tuesday' , 'wednesday' , 'thursday' , 'friday' , 'saturday' ) ; $ context = ( object ) [ 'name' => $ this -> get_full_name ( ) , 'id' => $ this -> get_id ( ) , 'days' => array_map ( function ( $ index ) use ( $ days , $ data ) { return [ 'index' => $ index , 'label' => get_string ( $ days [ $ index ] , 'calendar' ) , 'checked' => in_array ( $ index , $ data ) ] ; } , array_keys ( $ days ) ) ] ; $ element = $ OUTPUT -> render_from_template ( 'core_admin/setting_special_calendar_weekend' , $ context ) ; return format_admin_setting ( $ this , $ this -> visiblename , $ element , $ this -> description , false , '' , NULL , $ query ) ; }
docstring: Return XHTML to display the control
  
  @param array $data array of selected days
  @param string $query
  @return string XHTML for display (field + wrapping div(s)
docstring_tokens: Return XHTML to display the control