diff options
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Hook.pm | 15 | ||||
-rw-r--r-- | Bugzilla/Template.pm | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index d6ba5e1d0..d8ae67463 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -1479,6 +1479,21 @@ look at the code for C<create> in L<Bugzilla::Template>.) =back +=head2 template_after_create + +This hook allows you to manipulate the Template object before it is used. +You can use this to define new vmethods or filters in extensions. + +Params: + +=over + +=item C<template> + +This is the L<Bugzilla::Template> object. + +=back + =head2 template_before_process This hook is called any time Bugzilla processes a template file, including diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index decffe1e8..7294e27c1 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -1186,6 +1186,7 @@ sub create { Bugzilla::Hook::process('template_before_create', { config => $config }); my $template = $class->new($config) || die("Template creation failed: " . $class->error()); + Bugzilla::Hook::process('template_after_create', { template => $template }); # Pass on our current language to any template hooks or inner templates # called by this Template object. |