/** * Returns a url through which this task may be invoked via web. * * When system cron is not in use, running a cron task is accomplished * by outputting an image with the url returned by this function as * source. * * @return string URL through which this task may be invoked. */ public function get_url() { $params['cron_type'] = $this->get_name(); if ($this->is_parametrized()) { $params = array_merge($params, $this->task->get_parameters()); } return $this->routing_helper->route('phpbb_cron_run', $params); }
/** * Generate a URL to a route * * @param string $route Name of the route to travel * @param array $params String or array of additional url parameters * @param bool $is_amp Is url using & (true) or & (false) * @param string|bool $session_id Possibility to use a custom session id instead of the global one * @param bool|string $reference_type The type of reference to be generated (one of the constants) * @return string The URL already passed through append_sid() */ public function route($route, array $params = array(), $is_amp = true, $session_id = false, $reference_type = UrlGeneratorInterface::ABSOLUTE_PATH) { return $this->routing_helper->route($route, $params, $is_amp, $session_id, $reference_type); }