understanding Horde hooks
Sebastian Birnbach <[email protected]> Wed, 21 Jun 2017 12:32:26 +0200
| Newsgroups | gmane.comp.horde.devel |
|---|---|
| Message-ID | <CACTNBFO0nP4RQ1KxKiTxOaBRA+MiNUtYmdbpUQzvQDrCbGz-HQ@mail.gmail.com> |
I am trying to get an understanding of horde hooks and here is what I fould
out so far.
1.) For customisation there are predefined methods in hooks.php and the
list of methods cannot be extended.
2.) If I got
https://wiki.horde.org/CustomizingPreferencesH5?referrer=CustomizingPreferences#toc1
right, a hook method can be implemented for every user preference in the
$prefs object, so that the corresponding method is called upon every read
operation of the preference.
For instance, a hook to a hypothetical whups preference "some_pref" would
require the line
"$_prefs['some_pref']['hook'] = true;"
in whups/config/prefs.php.
The implementation would be done in whups/config/hooks.php:
public function some_pref() {
return "here goes your value";
}
Is this correct? Is there more to it? Any other resources?
Kind regards
birnbacs
--
dev mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]