original_string: public static function render_tourenabled_inplace_editable(tour $tour) {
          global $OUTPUT;
  
          if ($tour->is_enabled()) {
              $icon = 't/hide';
              $alt = get_string('disable');
              $value = 1;
          } else {
              $icon = 't/show';
              $alt = get_string('enable');
              $value = 0;
          }
  
          $editable = new \core\output\inplace_editable(
                  'tool_usertours',
                  'tourenabled',
                  $tour->get_id(),
                  true,
                  $OUTPUT->pix_icon($icon, $alt, 'moodle', [
                          'title' => $alt,
                      ]),
                  $value
              );
  
          $editable->set_type_toggle();
          return $editable;
      }
code: public static function render_tourenabled_inplace_editable(tour $tour) {
          global $OUTPUT;
  
          if ($tour->is_enabled()) {
              $icon = 't/hide';
              $alt = get_string('disable');
              $value = 1;
          } else {
              $icon = 't/show';
              $alt = get_string('enable');
              $value = 0;
          }
  
          $editable = new \core\output\inplace_editable(
                  'tool_usertours',
                  'tourenabled',
                  $tour->get_id(),
                  true,
                  $OUTPUT->pix_icon($icon, $alt, 'moodle', [
                          'title' => $alt,
                      ]),
                  $value
              );
  
          $editable->set_type_toggle();
          return $editable;
      }
code_tokens: public static function render_tourenabled_inplace_editable ( tour $ tour ) { global $ OUTPUT ; if ( $ tour -> is_enabled ( ) ) { $ icon = 't/hide' ; $ alt = get_string ( 'disable' ) ; $ value = 1 ; } else { $ icon = 't/show' ; $ alt = get_string ( 'enable' ) ; $ value = 0 ; } $ editable = new \ core \ output \ inplace_editable ( 'tool_usertours' , 'tourenabled' , $ tour -> get_id ( ) , true , $ OUTPUT -> pix_icon ( $ icon , $ alt , 'moodle' , [ 'title' => $ alt , ] ) , $ value ) ; $ editable -> set_type_toggle ( ) ; return $ editable ; }
docstring: Render the inplace editable used to edit the tour enable state.
  
  @param   tour        $tour       The tour to edit.
  @return  string
docstring_tokens: Render the inplace editable used to edit the tour enable state .