summaryrefslogtreecommitdiffstats
path: root/library/Director/Hook/IcingaObjectFormHook.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Director/Hook/IcingaObjectFormHook.php')
-rw-r--r--library/Director/Hook/IcingaObjectFormHook.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/library/Director/Hook/IcingaObjectFormHook.php b/library/Director/Hook/IcingaObjectFormHook.php
new file mode 100644
index 0000000..1d20ee1
--- /dev/null
+++ b/library/Director/Hook/IcingaObjectFormHook.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Icinga\Module\Director\Hook;
+
+use Icinga\Module\Director\Web\Form\DirectorObjectForm;
+use Icinga\Web\Hook;
+
+abstract class IcingaObjectFormHook
+{
+ protected $settings = [];
+
+ abstract public function onSetup(DirectorObjectForm $form);
+
+ public static function callOnSetup(DirectorObjectForm $form)
+ {
+ /** @var static[] $implementations */
+ $implementations = Hook::all('director/IcingaObjectForm');
+ foreach ($implementations as $implementation) {
+ $implementation->onSetup($form);
+ }
+ }
+}