protected function get_parent_record() {
        global $DB;

        if (!isset($this->parentrecord)) {
            $this->parentrecord = $DB->get_record('event', ['id' => $this->parentid]);
        }

        return $this->parentrecord;
    }
protected function get_parent_record() {
        global $DB;

        if (!isset($this->parentrecord)) {
            $this->parentrecord = $DB->get_record('event', ['id' => $this->parentid]);
        }

        return $this->parentrecord;
    }
protected function get_parent_record ( ) { global $ DB ; if ( ! isset ( $ this -> parentrecord ) ) { $ this -> parentrecord = $ DB -> get_record ( 'event' , [ 'id' => $ this -> parentid ] ) ; } return $ this -> parentrecord ; }
Return the parent DB record.

@return \stdClass
Return the parent DB record .