Function __global->get_self_url
Definitions
sources/urls.php
- Get a well formed URL equivalent to the current URL.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $evaluate | boolean | No | No | False | N/A | N/A | Whether to evaluate the URL (so as we don't return Tempcode) |
| $root_if_posted | boolean | No | No | False | N/A | N/A | Whether to direct to the default page if there was a POST request leading to where we are now (i.e. to avoid missing post fields when we go to this URL) |
| $extra_params | array | No | No | [] | N/A | N/A | A map of extra parameters for the URL |
| $posted_too | boolean | No | No | False | N/A | N/A | Whether to also keep POSTed data, in the GET request (useful if either_param_string is used to get the data instead of post_param_string - of course the POST data must be of the not--persistent-state-changing variety) |
| $avoid_remap | boolean | No | No | False | N/A | N/A | Whether to avoid URL Schemes (sometimes essential so we can assume the standard URL parameter addition scheme in templates) |
Returns
- The URL (string or Tempcode)
- Type: mixed
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get a well formed URL equivalent to the current URL.
*
* @param boolean $evaluate Whether to evaluate the URL (so as we don't return Tempcode)
* @param boolean $root_if_posted Whether to direct to the default page if there was a POST request leading to where we are now (i.e. to avoid missing post fields when we go to this URL)
* @param array $extra_params A map of extra parameters for the URL
* @param boolean $posted_too Whether to also keep POSTed data, in the GET request (useful if either_param_string is used to get the data instead of post_param_string - of course the POST data must be of the not--persistent-state-changing variety)
* @param boolean $avoid_remap Whether to avoid URL Schemes (sometimes essential so we can assume the standard URL parameter addition scheme in templates)
* @return mixed The URL (string or Tempcode)
*/
function get_self_url(bool $evaluate = false, bool $root_if_posted = false, array $extra_params = [], bool $posted_too = false, bool $avoid_remap = false)
* Get a well formed URL equivalent to the current URL.
*
* @param boolean $evaluate Whether to evaluate the URL (so as we don't return Tempcode)
* @param boolean $root_if_posted Whether to direct to the default page if there was a POST request leading to where we are now (i.e. to avoid missing post fields when we go to this URL)
* @param array $extra_params A map of extra parameters for the URL
* @param boolean $posted_too Whether to also keep POSTed data, in the GET request (useful if either_param_string is used to get the data instead of post_param_string - of course the POST data must be of the not--persistent-state-changing variety)
* @param boolean $avoid_remap Whether to avoid URL Schemes (sometimes essential so we can assume the standard URL parameter addition scheme in templates)
* @return mixed The URL (string or Tempcode)
*/
function get_self_url(bool $evaluate = false, bool $root_if_posted = false, array $extra_params = [], bool $posted_too = false, bool $avoid_remap = false)
