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;
    }
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;
    }
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 ; }
Reload the tour into the current object.

@param   stdClass    $record     The record to reload.
@param   boolean     $clean      Clean the values.
@return  tour
Reload the tour into the current object .