Render the inplace editable used to edit the tour name.

@param   tour        $tour       The tour to edit.
@return  string
976569
public static function render_tourname_inplace_editable(tour $tour) {
        return new \core\output\inplace_editable(
                'tool_usertours',
                'tourname',
                $tour->get_id(),
                true,
                \html_writer::link(
                    $tour->get_view_link(),
                    $tour->get_name()
                ),
                $tour->get_name()
            );
    }
826169
public function render_request($template)
    {
        $this->modelReplacements[':app_namespace'] = $this->getAppNamespace();
        $this->modelReplacements[':request_name'] = $this->command->request_name($this->identifier);
        $this->modelReplacements[':model_name'] = $this->command->model_name($this->identifier);

        $template = strtr($template, $this->modelReplacements);

        return $template;
    }
697290
public static function get_edit_tour_link($tourid = null) {
        $link = new \moodle_url('/admin/tool/usertours/configure.php');

        if ($tourid) {
            $link->param('action', manager::ACTION_EDITTOUR);
            $link->param('id', $tourid);
        } else {
            $link->param('action', manager::ACTION_NEWTOUR);
        }

        return $link;
    }
47630
public function render($template = null)
    {
        if (null === $template) {
            $template = 'SilvestraAdminBundle:Menu:vertical_admin_menu.html.twig';
        }

        return $this->helper->render($template, $this->builder->build());
    }
14464
public function inplace_editable_name() {

        $displayname = format_string($this->get_name());

        return new \core\output\inplace_editable('core_analytics', 'modelname', $this->model->id,
            has_capability('moodle/analytics:managemodels', \context_system::instance()), $displayname, $this->model->name);
    }
257666
@Override
    public String toUrl() {
        return String.format("%s.js%s", Ref.getRelativeRef(ref),
                getParams().size() > 0 ? ("?" + URLEncodedUtils.format(getParams(), "utf-8")) : "");
    }
468613
public function render($template)
    {
        $actions = $this->getActions();
        $this->flushActions();

        return $this->table->getRender()->getTwig()->render($template, ['actions' => $actions]);
    }
990930
protected function renderVar($varName)
	{
		//return either string or rendered value
		if ($this->{$varName} instanceof \Closure) {
			return call_user_func($this->{$varName});
		} else {
			return $this->{$varName};
		}
	}
449567
public function pageH1Ext($route = null, array $replacements = []) {
        if(!$route) {
            $route = \Route::currentRouteName();
        }

        return $this->applyReplacement(Arr::get(self::pageH1ExtValues(), $route), $replacements);
    }
1156248
public function indexUrl()
    {
        $route = 'admin::edit-page';
        if (Route::has($route)) {
            return route($route, $this->page_id);
        }

        return route('dashboard');
    }
77917
protected function edit_tour($id = null) {
        global $PAGE;
        if ($id) {
            $tour = tour::instance($id);
            $PAGE->navbar->add($tour->get_name(), $tour->get_edit_link());

        } else {
            $tour = new tour();
            $PAGE->navbar->add(get_string('newtour', 'tool_usertours'), $tour->get_edit_link());
        }

        $form = new forms\edittour($tour);

        if ($form->is_cancelled()) {
            redirect(helper::get_list_tour_link());
        } else if ($data = $form->get_data()) {
            // Creating a new tour.
            $tour->set_name($data->name);
            $tour->set_description($data->description);
            $tour->set_pathmatch($data->pathmatch);
            $tour->set_enabled(!empty($data->enabled));

            foreach (configuration::get_defaultable_keys() as $key) {
                $tour->set_config($key, $data->$key);
            }

            // Save filter values.
            foreach (helper::get_all_filters() as $filterclass) {
                $filterclass::save_filter_values_from_form($tour, $data);
            }

            $tour->persist();

            redirect(helper::get_list_tour_link());
        } else {
            if (empty($tour)) {
                $this->header('newtour');
            } else {
                if (!empty($tour->get_config(self::CONFIG_SHIPPED_TOUR))) {
                    notification::add(get_string('modifyshippedtourwarning', 'tool_usertours'), notification::WARNING);
                }

                $this->header($tour->get_name());
                $data = $tour->prepare_data_for_form();

                // Prepare filter values for the form.
                foreach (helper::get_all_filters() as $filterclass) {
                    $filterclass::prepare_filter_values_for_form($tour, $data);
                }
                $form->set_data($data);
            }

            $form->display();
            $this->footer();
        }
    }
318121
public static function prepare_filter_values_for_form(tour $tour, \stdClass $data) {
        $filtername = static::get_filter_name();
        $key = "filter_{$filtername}";
        $values = $tour->get_filter_values($filtername);
        if (empty($values)) {
            $values = 0;
        }
        $data->$key = $values;
        return $data;
    }
979262
protected function getEditPath()
    {
        $key = $this->panel->getParent()->getModel()->getKey();

        return $this->getListPath().'/'.$key.'/edit';
    }
930187
public static function get_current_tour($reset = false) {
        global $PAGE;

        static $tour = false;

        if ($tour === false || $reset) {
            $tour = self::get_matching_tours($PAGE->url);
        }

        return $tour;
    }
1100559
public static function renderTemplate($template, $replacements){
		foreach ($replacements as $find => $replace) {
			$template = \str_replace($find, $replace, $template);
		}
		return $template;
	}
751900
public function pageTitle($route = null, array  $replacements = []) {
        if(!$route) {
            $route = \Route::currentRouteName();
        }

        return $this->applyReplacement(Arr::get(self::pageTitleValues(), $route, 'title'), $replacements);
    }
453041
public function edit($id)
    {
        $configuration = Configuration::findOrFail($id);
        $should_serialize = Setting::is_serialized($configuration->value);
        $default_serialized = Setting::is_serialized($configuration->default);

        return view('ticketit::admin.configuration.edit', compact('configuration', 'should_serialize', 'default_serialized'));
    }