From d7801737f6f94c93455652c092d5a667ec0872b9 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Wed, 5 Aug 2020 16:32:46 +0000 Subject: [PATCH] [COMPONENT][PLUGIN] Small refactor and add license --- components/Email/Email.php | 4 +++- components/XMPP/XMPP.php | 34 ++++++++++++++++++++++++++++++++++ plugins/Test/Test.php | 17 +++++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 components/XMPP/XMPP.php diff --git a/components/Email/Email.php b/components/Email/Email.php index 2852e7ffa4..c37110835f 100644 --- a/components/Email/Email.php +++ b/components/Email/Email.php @@ -32,12 +32,14 @@ namespace Component\Email; +use App\Core\Event; use App\Core\Module; class Email extends Module { - public function onAddNotificationTransport($form_defs) + public function onAddNotificationTransport(&$form_defs): bool { $form_defs['email'] = $form_defs['placeholder']; + return Event::next; } } diff --git a/components/XMPP/XMPP.php b/components/XMPP/XMPP.php new file mode 100644 index 0000000000..aac91684b7 --- /dev/null +++ b/components/XMPP/XMPP.php @@ -0,0 +1,34 @@ +. + +// }}} + +namespace Component\XMPP; + +use App\Core\Event; +use App\Core\Module; + +class XMPP extends Module +{ + public function onAddNotificationTransport(&$form_defs): bool + { + $form_defs['xmpp'] = $form_defs['placeholder']; + return Event::next; + } +} diff --git a/plugins/Test/Test.php b/plugins/Test/Test.php index fabe50e7c6..b0350cc2e9 100644 --- a/plugins/Test/Test.php +++ b/plugins/Test/Test.php @@ -1,5 +1,22 @@ . +// }}} + namespace Plugin\Test; use App\Core\Module;