Function __global->hyperlink
Definitions
sources/templates.php
- Get the Tempcode for a hyperlink.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $url | mixed | No | No | required parameter | N/A | N/A | The URL to put in the hyperlink (URLPATH or Tempcode) |
| $caption | mixed | No | No | required parameter | N/A | N/A | The hyperlinks caption, format depends on $auto_escape (string or Tempcode) |
| $external | boolean | No | No | required parameter | N/A | N/A | Whether the link is an external one (by default, the external template makes it open in a new window) |
| $auto_escape | boolean | No | No | required parameter | N/A | N/A | Whether to automatically escape if $caption is plain-text entry so that it cannot contain HTML |
| $title | mixed | No | No | Blank (empty string) | N/A | N/A | Link title, in plain-text format (string or Tempcode) (blank: none) |
| $accesskey | ?string | No | No | Null | N/A | N/A | The access key to use (null: none) |
| $post_data | ?Tempcode | No | No | Null | N/A | N/A | Data to post (null: an ordinary link) |
| $rel | ?string | No | No | Null | N/A | N/A | Rel (link type) (null: no special type) |
| $overlay | ?ID_TEXT | No | No | Null | N/A | N/A | Open in overlay with the default link/form target being as follows (e.g. _top or _self) (null: an ordinary link) |
Returns
- The generated hyperlink
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the Tempcode for a hyperlink.
*
* @param mixed $url The URL to put in the hyperlink (URLPATH or Tempcode)
* @param mixed $caption The hyperlinks caption, format depends on $auto_escape (string or Tempcode)
* @param boolean $external Whether the link is an external one (by default, the external template makes it open in a new window)
* @param boolean $auto_escape Whether to automatically escape if $caption is plain-text entry so that it cannot contain HTML
* @param mixed $title Link title, in plain-text format (string or Tempcode) (blank: none)
* @param ?string $accesskey The access key to use (null: none)
* @param ?Tempcode $post_data Data to post (null: an ordinary link)
* @param ?string $rel Rel (link type) (null: no special type)
* @param ?ID_TEXT $overlay Open in overlay with the default link/form target being as follows (e.g. _top or _self) (null: an ordinary link)
* @return Tempcode The generated hyperlink
*/
function hyperlink($url, $caption, bool $external, bool $auto_escape, $title = '', ?string $accesskey = null, ?object $post_data = null, ?string $rel = null, ?string $overlay = null) : object
* Get the Tempcode for a hyperlink.
*
* @param mixed $url The URL to put in the hyperlink (URLPATH or Tempcode)
* @param mixed $caption The hyperlinks caption, format depends on $auto_escape (string or Tempcode)
* @param boolean $external Whether the link is an external one (by default, the external template makes it open in a new window)
* @param boolean $auto_escape Whether to automatically escape if $caption is plain-text entry so that it cannot contain HTML
* @param mixed $title Link title, in plain-text format (string or Tempcode) (blank: none)
* @param ?string $accesskey The access key to use (null: none)
* @param ?Tempcode $post_data Data to post (null: an ordinary link)
* @param ?string $rel Rel (link type) (null: no special type)
* @param ?ID_TEXT $overlay Open in overlay with the default link/form target being as follows (e.g. _top or _self) (null: an ordinary link)
* @return Tempcode The generated hyperlink
*/
function hyperlink($url, $caption, bool $external, bool $auto_escape, $title = '', ?string $accesskey = null, ?object $post_data = null, ?string $rel = null, ?string $overlay = null) : object

