From b9b4feb3867339f51c10b5341b61ccd4438cbc30 Mon Sep 17 00:00:00 2001 From: farbod Date: Fri, 26 Mar 2021 14:38:31 +0100 Subject: [PATCH] make plugin available for Course only, fixes #34 --- MeetingPlugin.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/MeetingPlugin.php b/MeetingPlugin.php index 5f818da6..0828be2b 100644 --- a/MeetingPlugin.php +++ b/MeetingPlugin.php @@ -62,6 +62,17 @@ public function __construct() } } + /** + * Checks if the context in which the plugin is activated is of Course type. + * + * @param Range $context + * @return bool + */ + public function isActivatableForContext(Range $context) + { + return get_class($context) === \Course::class; + } + /** * Plugin localization for a single string. * This method supports sprintf()-like execution if you pass additional