Function __global->attach_message
Definitions
sources/minikernel.php
- Attach a message to the page output.For response-embedded messaging where the code isn't failing per-se, but it's more like a predictable messaging situation occurred.For failure-like messages call trigger_error which will in turn call attach_message itself.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $message | mixed | No | No | required parameter | N/A | N/A | The message to show, provided in plain-text format or HTML Tempcode |
| $type | ID_TEXT | No | No | inform | inform notice warn | N/A | The 'template' to use |
| $put_in_helper_panel | boolean | No | No | False | N/A | N/A | Whether to put into the helper panel instead of the normal header area (true: minikernel suppresses the message completely) |
| $log_error | boolean | No | No | False | N/A | N/A | Whether to log the error |
Returns
- Blank string so it can be chained in the Tempcode compiler. You will rarely want to use this return value. It's kind of a failsafe.
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Attach a message to the page output.For response-embedded messaging where the code isn't failing per-se, but it's more like a predictable messaging situation occurred.For failure-like messages call trigger_error which will in turn call attach_message itself.
*
* @param mixed $message The message to show, provided in plain-text format or HTML Tempcode
* @param ID_TEXT $type The 'template' to use
* @set inform notice warn
* @param boolean $put_in_helper_panel Whether to put into the helper panel instead of the normal header area (true: minikernel suppresses the message completely)
* @param boolean $log_error Whether to log the error
* @return string Blank string so it can be chained in the Tempcode compiler. You will rarely want to use this return value. It's kind of a failsafe.
*/
function attach_message($message, string $type = 'inform', bool $put_in_helper_panel = false, bool $log_error = false) : string
* Attach a message to the page output.For response-embedded messaging where the code isn't failing per-se, but it's more like a predictable messaging situation occurred.For failure-like messages call trigger_error which will in turn call attach_message itself.
*
* @param mixed $message The message to show, provided in plain-text format or HTML Tempcode
* @param ID_TEXT $type The 'template' to use
* @set inform notice warn
* @param boolean $put_in_helper_panel Whether to put into the helper panel instead of the normal header area (true: minikernel suppresses the message completely)
* @param boolean $log_error Whether to log the error
* @return string Blank string so it can be chained in the Tempcode compiler. You will rarely want to use this return value. It's kind of a failsafe.
*/
function attach_message($message, string $type = 'inform', bool $put_in_helper_panel = false, bool $log_error = false) : string
sources/site.php
- Attach a message to the page output.For response-embedded messaging where the code isn't failing per-se, but it's more like a predictable messaging situation occurred.For failure-like messages call trigger_error which will in turn call attach_message itself.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $message | mixed | No | No | required parameter | N/A | N/A | The message to show, provided in plain-text format or HTML Tempcode |
| $type | ID_TEXT | No | No | inform | inform notice warn | N/A | The 'template' to use |
| $put_in_helper_panel | boolean | No | No | False | N/A | N/A | Whether to put into the helper panel instead of the normal header area |
| $log_error | boolean | No | No | False | N/A | N/A | Whether to log the error |
Returns
- Blank string so it can be chained in the Tempcode compiler. You will rarely want to use this return value. It's kind of a failsafe.
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Attach a message to the page output.For response-embedded messaging where the code isn't failing per-se, but it's more like a predictable messaging situation occurred.For failure-like messages call trigger_error which will in turn call attach_message itself.
*
* @param mixed $message The message to show, provided in plain-text format or HTML Tempcode
* @param ID_TEXT $type The 'template' to use
* @set inform notice warn
* @param boolean $put_in_helper_panel Whether to put into the helper panel instead of the normal header area
* @param boolean $log_error Whether to log the error
* @return string Blank string so it can be chained in the Tempcode compiler. You will rarely want to use this return value. It's kind of a failsafe.
*/
function attach_message($message, string $type = 'inform', bool $put_in_helper_panel = false, bool $log_error = false) : string
* Attach a message to the page output.For response-embedded messaging where the code isn't failing per-se, but it's more like a predictable messaging situation occurred.For failure-like messages call trigger_error which will in turn call attach_message itself.
*
* @param mixed $message The message to show, provided in plain-text format or HTML Tempcode
* @param ID_TEXT $type The 'template' to use
* @set inform notice warn
* @param boolean $put_in_helper_panel Whether to put into the helper panel instead of the normal header area
* @param boolean $log_error Whether to log the error
* @return string Blank string so it can be chained in the Tempcode compiler. You will rarely want to use this return value. It's kind of a failsafe.
*/
function attach_message($message, string $type = 'inform', bool $put_in_helper_panel = false, bool $log_error = false) : string

