diff options
| author | Rasmus Fuhse <fuhse@data-quest.de> | 2023-08-23 14:57:39 +0200 |
|---|---|---|
| committer | Rasmus Fuhse <fuhse@data-quest.de> | 2023-08-23 14:57:39 +0200 |
| commit | b9516cf97a85b03983d9355d5c36fe8efd33cdda (patch) | |
| tree | 560a3db15376f014616597d0d24a44cbb156e89e /lib | |
| parent | 91fde2de39dee6f630728d6c1236b9e6903022e6 (diff) | |
re #3084issue-3084
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/classes/AdminCourseFilter.class.php | 4 | ||||
| -rw-r--r-- | lib/plugins/core/AdminCourseWidget.class.php | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/classes/AdminCourseFilter.class.php b/lib/classes/AdminCourseFilter.class.php index a934ebe..f803082 100644 --- a/lib/classes/AdminCourseFilter.class.php +++ b/lib/classes/AdminCourseFilter.class.php @@ -171,6 +171,10 @@ class AdminCourseFilter 'de_' . $datafield_id . '_content' => '%' . $value . '%' ]); } + + foreach (PluginManager::getInstance()->getPlugins('AdminCourseWidgetPlugin') as $plugin) { + $plugin->applyFilter($this); + } } /** diff --git a/lib/plugins/core/AdminCourseWidget.class.php b/lib/plugins/core/AdminCourseWidget.class.php new file mode 100644 index 0000000..3f67b7b --- /dev/null +++ b/lib/plugins/core/AdminCourseWidget.class.php @@ -0,0 +1,18 @@ +<?php +interface AdminCourseWidgetPlugin +{ + /** + * Returns an array of widgets in the way: ['select_studiengang' => $select_widget]. + * The indexes are the names of the parameter. + * @return array of SidebarWidget + */ + public function getWidgets(): array; + + public function getFilterValues(): array; + + public function applyFilter(AdminCourseFilter $filter): void; + + public function setFilter(string $name, $value): void; + + public function getPositionInSidebar($name): ?string; +} |
