From f6fc02e572ba07782a272e8fc8f9f45e13ba4896 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Wed, 10 Feb 2010 16:00:32 -0800 Subject: Bug 545524: New Hook: object_validators r=mkanat, a=mkanat (module owner) --- Bugzilla/Hook.pm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'Bugzilla/Hook.pm') diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index 13e435e86..faef9f07d 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -675,6 +675,32 @@ L returns. =back +=head2 object_validators + +Allows you to add new items to L for +particular classes. + +Params: + +=over + +=item C + +The name of the class that C was called on. You can check this +like C<< if ($class->isa('Some::Class')) >> in your code, to add +validators only for certain classes + +=item C + +A hashref, where the keys are database columns and the values are subroutine +references. You can add new validators or modify existing ones. If you modify +an existing one, you should remember to call the original validator +inside of your modified validator. (This way, several extensions can all +modify the same validator.) + +=back + + =head2 page_before_template This is a simple way to add your own pages to Bugzilla. This hooks C, -- cgit v1.2.1