Jelix 1.8.8

function.hook.php

Tags
subpackage

jtpl_plugin

author

Olivier Demah

copyright

2009 Olivier Demah

see
http://www.jelix.org
licence

GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html

Table of Contents

jtpl_function_html_hook()  : mixed
hook plugin.

Functions

jtpl_function_html_hook()

hook plugin.

jtpl_function_html_hook(jTpl $tpl, string $event[, array<string|int, mixed> $params = array() ]) : mixed

It allows to retrieve HTML content, coming from responses of an event, and inserting at the place of the hook tag.

Example:

{hook 'myevent'}

In a Jelix Event listener:

function onmyevent($event) { $event->add('
html content
'); }

Result:

html content
Parameters
$tpl : jTpl

template engine

$event : string

the event name to call

$params : array<string|int, mixed> = array()

parameters to give to the listener

Tags
Return values
mixed

Search results