Function __global->generate_tooltip_by_truncation
Definitions
sources/templates_tooltip.php
- Show a tooltip by truncating some text.Note we also have the generate_tooltip_by_truncation_advanced function which is much more powerful and is what drives the $TRUNCATE_* symbols.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $text | string | No | No | required parameter | N/A | N/A | The text, provided in plain-text format (string or Tempcode) |
| $len | integer | No | No | 60 | N/A | N/A | The length to truncate at |
Returns
- The tooltip (or a null-op if $text is not long enough)
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Show a tooltip by truncating some text.Note we also have the generate_tooltip_by_truncation_advanced function which is much more powerful and is what drives the $TRUNCATE_* symbols.
*
* @param string $text The text, provided in plain-text format (string or Tempcode)
* @param integer $len The length to truncate at
* @return Tempcode The tooltip (or a null-op if $text is not long enough)
*/
function generate_tooltip_by_truncation(string $text, int $len = 60) : object
* Show a tooltip by truncating some text.Note we also have the generate_tooltip_by_truncation_advanced function which is much more powerful and is what drives the $TRUNCATE_* symbols.
*
* @param string $text The text, provided in plain-text format (string or Tempcode)
* @param integer $len The length to truncate at
* @return Tempcode The tooltip (or a null-op if $text is not long enough)
*/
function generate_tooltip_by_truncation(string $text, int $len = 60) : object

