diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-02-10 16:00:32 -0800 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-02-10 16:00:32 -0800 |
commit | f6fc02e572ba07782a272e8fc8f9f45e13ba4896 (patch) | |
tree | f88912a82e4a85661d61716e5f3975ea35ed838b /Bugzilla/Hook.pm | |
parent | 80477beb472a83f6fa711358372db9edf6209c39 (diff) | |
download | bugs-f6fc02e572ba07782a272e8fc8f9f45e13ba4896.tar bugs-f6fc02e572ba07782a272e8fc8f9f45e13ba4896.tar.gz bugs-f6fc02e572ba07782a272e8fc8f9f45e13ba4896.tar.bz2 bugs-f6fc02e572ba07782a272e8fc8f9f45e13ba4896.tar.xz bugs-f6fc02e572ba07782a272e8fc8f9f45e13ba4896.zip |
Bug 545524: New Hook: object_validators
r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'Bugzilla/Hook.pm')
-rw-r--r-- | Bugzilla/Hook.pm | 26 |
1 files changed, 26 insertions, 0 deletions
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<Bugzilla::Object/update> returns. =back +=head2 object_validators + +Allows you to add new items to L<Bugzilla::Object/VALIDATORS> for +particular classes. + +Params: + +=over + +=item C<class> + +The name of the class that C<VALIDATORS> 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<validators> + +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<page.cgi>, |