aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-05-10 05:23:54 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-11-17 16:39:59 -0500
commit4b28b413f2ccaa45ab354f48b0015e544dd249da (patch)
tree28a7e1e5a5d36a6c17a3b396872748953d7d4d6f /phpBB/includes
parentfaf96a1b4017c2bdceb4458c1d84959cb07da9bb (diff)
downloadforums-4b28b413f2ccaa45ab354f48b0015e544dd249da.tar
forums-4b28b413f2ccaa45ab354f48b0015e544dd249da.tar.gz
forums-4b28b413f2ccaa45ab354f48b0015e544dd249da.tar.bz2
forums-4b28b413f2ccaa45ab354f48b0015e544dd249da.tar.xz
forums-4b28b413f2ccaa45ab354f48b0015e544dd249da.zip
[feature/template-events] Update EVENT tag documentation.
It should now fairly closely reflect what actually happens. PHPBB3-9550
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/template/filter.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/phpBB/includes/template/filter.php b/phpBB/includes/template/filter.php
index cb0b2b0cd9..9f814f5c5f 100644
--- a/phpBB/includes/template/filter.php
+++ b/phpBB/includes/template/filter.php
@@ -881,7 +881,27 @@ class phpbb_template_filter extends php_user_filter
/**
* Compile EVENT tag.
*
- * $tag_args should be a single string identifying hook location.
+ * $tag_args should be a single string identifying the event.
+ * The event name can contain letters, numbers and underscores only.
+ * If an invalid event name is specified, an E_USER_ERROR will be
+ * triggered.
+ *
+ * Event tags are only functional when the template engine has
+ * an instance of the extension manager. Extension manager would
+ * be called upon to find all extensions listening for the specified
+ * event, and to obtain additional template fragments. All such
+ * template fragments will be compiled and included in the generated
+ * compiled template code for the current template being compiled.
+ *
+ * The above means that whenever an extension is enabled or disabled,
+ * template cache should be cleared in order to update the compiled
+ * template code for the active set of template event listeners.
+ *
+ * This also means that extensions cannot return different template
+ * fragments at different times. Once templates are compiled, changing
+ * such template fragments would have no effect.
+ *
+ * @param string $tag_args EVENT tag arguments, as a string - for EVENT this is the event name
*/
private function compile_tag_event($tag_args)
{