[dev] understanding Horde hooks

Sebastian Birnbach birnbacs at gmail.com
Wed Jun 21 10:32:26 UTC 2017


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


More information about the dev mailing list