Function __global->redirect_exit
Definitions
sources/site2.php
- Assign an immediate redirect to the specified URL and output a message.Call this if doing a redirect deep within code that would not normally be able to return a UI screen.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $url | mixed | No | No | required parameter | N/A | N/A | Refresh to this URL (URLPATH or Tempcode URL) |
| $title | ?Tempcode | No | No | Null | N/A | N/A | Title to display on redirect page (null: standard redirection title) |
| $text | ?mixed | No | No | Null | N/A | N/A | Message to show (may be Tempcode) (null: standard redirection message) |
| $intermediary_hop | boolean | No | No | False | N/A | N/A | For intermediary hops, don't mark so as to read status messages - save them up for the next hop (which will not be intermediary) |
| $msg_type | ID_TEXT | No | No | inform | warn inform fatal | N/A | Code of message type to show |
Preview
Code (PHP)
/**
* Assign an immediate redirect to the specified URL and output a message.Call this if doing a redirect deep within code that would not normally be able to return a UI screen.
*
* @param mixed $url Refresh to this URL (URLPATH or Tempcode URL)
* @param ?Tempcode $title Title to display on redirect page (null: standard redirection title)
* @param ?mixed $text Message to show (may be Tempcode) (null: standard redirection message)
* @param boolean $intermediary_hop For intermediary hops, don't mark so as to read status messages - save them up for the next hop (which will not be intermediary)
* @param ID_TEXT $msg_type Code of message type to show
* @set warn inform fatal
*/
function redirect_exit($url, ?object $title = null, $text = null, bool $intermediary_hop = false, string $msg_type = 'inform')
* Assign an immediate redirect to the specified URL and output a message.Call this if doing a redirect deep within code that would not normally be able to return a UI screen.
*
* @param mixed $url Refresh to this URL (URLPATH or Tempcode URL)
* @param ?Tempcode $title Title to display on redirect page (null: standard redirection title)
* @param ?mixed $text Message to show (may be Tempcode) (null: standard redirection message)
* @param boolean $intermediary_hop For intermediary hops, don't mark so as to read status messages - save them up for the next hop (which will not be intermediary)
* @param ID_TEXT $msg_type Code of message type to show
* @set warn inform fatal
*/
function redirect_exit($url, ?object $title = null, $text = null, bool $intermediary_hop = false, string $msg_type = 'inform')

