Function Hook_media_rendering_audio_general->render
Definitions
sources/hooks/systems/media_rendering/audio_general.php
- Provide code to display what is at the URL, in the most appropriate way.
- 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 | URL to render |
| $url_safe | mixed | No | No | required parameter | N/A | N/A | URL to render (no sessions etc) |
| $attributes | array | No | No | required parameter | N/A | N/A | Attributes (e.g. width, height, length) |
| $as_admin | boolean | No | No | False | N/A | N/A | Whether there are admin privileges, to render dangerous media types |
| $source_member | ?MEMBER | No | No | Null | N/A | N/A | Member to run as (null: current member) |
| $url_direct_filesystem | ?URLPATH | No | No | Null | N/A | N/A | Direct URL (not via a script) (null: just use the normal URL) |
| $original_filename | ?string | No | No | Null | N/A | N/A | Originally filename to display as a link caption where appropriate (null: use $url_safe) |
Returns
- Rendered version
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Provide code to display what is at the URL, in the most appropriate way.
*
* @param mixed $url URL to render
* @param mixed $url_safe URL to render (no sessions etc)
* @param array $attributes Attributes (e.g. width, height, length)
* @param boolean $as_admin Whether there are admin privileges, to render dangerous media types
* @param ?MEMBER $source_member Member to run as (null: current member)
* @param ?URLPATH $url_direct_filesystem Direct URL (not via a script) (null: just use the normal URL)
* @param ?string $original_filename Originally filename to display as a link caption where appropriate (null: use $url_safe)
* @return Tempcode Rendered version
*/
public function render($url, $url_safe, array $attributes, bool $as_admin = false, ?int $source_member = null, ?string $url_direct_filesystem = null, ?string $original_filename = null) : object
* Provide code to display what is at the URL, in the most appropriate way.
*
* @param mixed $url URL to render
* @param mixed $url_safe URL to render (no sessions etc)
* @param array $attributes Attributes (e.g. width, height, length)
* @param boolean $as_admin Whether there are admin privileges, to render dangerous media types
* @param ?MEMBER $source_member Member to run as (null: current member)
* @param ?URLPATH $url_direct_filesystem Direct URL (not via a script) (null: just use the normal URL)
* @param ?string $original_filename Originally filename to display as a link caption where appropriate (null: use $url_safe)
* @return Tempcode Rendered version
*/
public function render($url, $url_safe, array $attributes, bool $as_admin = false, ?int $source_member = null, ?string $url_direct_filesystem = null, ?string $original_filename = null) : object

