/** * Returns relevant URL. * * @return \moodle_url */ public function get_url() { return \tool_usertours\helper::get_edit_step_link($this->other['tourid'], $this->objectid); }
/** * Print the edit step link. * * @param int $tourid The ID of the tour. * @param int $stepid The ID of the step. * @return string */ protected function print_edit_step_link($tourid, $stepid = null) { $addlink = helper::get_edit_step_link($tourid, $stepid); $attributes = []; if (empty($stepid)) { $attributes['class'] = 'createstep'; } echo \html_writer::link($addlink, get_string('newstep', 'tool_usertours'), $attributes); }