original_string: protected function reload_from_record($record, $clean = false) {
          $this->id           = $record->id;
          if (!property_exists($record, 'description')) {
              if (property_exists($record, 'comment')) {
                  $record->description = $record->comment;
                  unset($record->comment);
              }
          }
          if ($clean) {
              $this->name         = clean_param($record->name, PARAM_TEXT);
              $this->description  = clean_text($record->description);
          } else {
              $this->name         = $record->name;
              $this->description  = $record->description;
          }
          $this->pathmatch    = $record->pathmatch;
          $this->enabled      = $record->enabled;
          if (isset($record->sortorder)) {
              $this->sortorder = $record->sortorder;
          }
          $this->config       = json_decode($record->configdata);
          $this->dirty        = false;
          $this->steps        = [];
  
          return $this;
      }
code: protected function reload_from_record($record, $clean = false) {
          $this->id           = $record->id;
          if (!property_exists($record, 'description')) {
              if (property_exists($record, 'comment')) {
                  $record->description = $record->comment;
                  unset($record->comment);
              }
          }
          if ($clean) {
              $this->name         = clean_param($record->name, PARAM_TEXT);
              $this->description  = clean_text($record->description);
          } else {
              $this->name         = $record->name;
              $this->description  = $record->description;
          }
          $this->pathmatch    = $record->pathmatch;
          $this->enabled      = $record->enabled;
          if (isset($record->sortorder)) {
              $this->sortorder = $record->sortorder;
          }
          $this->config       = json_decode($record->configdata);
          $this->dirty        = false;
          $this->steps        = [];
  
          return $this;
      }
code_tokens: protected function reload_from_record ( $ record , $ clean = false ) { $ this -> id = $ record -> id ; if ( ! property_exists ( $ record , 'description' ) ) { if ( property_exists ( $ record , 'comment' ) ) { $ record -> description = $ record -> comment ; unset ( $ record -> comment ) ; } } if ( $ clean ) { $ this -> name = clean_param ( $ record -> name , PARAM_TEXT ) ; $ this -> description = clean_text ( $ record -> description ) ; } else { $ this -> name = $ record -> name ; $ this -> description = $ record -> description ; } $ this -> pathmatch = $ record -> pathmatch ; $ this -> enabled = $ record -> enabled ; if ( isset ( $ record -> sortorder ) ) { $ this -> sortorder = $ record -> sortorder ; } $ this -> config = json_decode ( $ record -> configdata ) ; $ this -> dirty = false ; $ this -> steps = [ ] ; return $ this ; }
docstring: Reload the tour into the current object.
  
  @param   stdClass    $record     The record to reload.
  @param   boolean     $clean      Clean the values.
  @return  tour
docstring_tokens: Reload the tour into the current object .