diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-10-10 07:50:41 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-10-10 09:53:07 +0200 |
| commit | aade507e8928b9953eeba427b4fb7359e240ab2d (patch) | |
| tree | f06d75f04a823de50c4f44f7faeb7718895dad50 /lib/plugins/core | |
| parent | f06381fd9d0832797d15810623ee31ab17fc3711 (diff) | |
introduce interface AdminCourseWidgetPlugin and adjust core admin courses to it, fixes #3084
Closes #3084
Merge request studip/studip!2071
Diffstat (limited to 'lib/plugins/core')
| -rw-r--r-- | lib/plugins/core/AdminCourseWidgetPlugin.class.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/plugins/core/AdminCourseWidgetPlugin.class.php b/lib/plugins/core/AdminCourseWidgetPlugin.class.php new file mode 100644 index 0000000..c554626 --- /dev/null +++ b/lib/plugins/core/AdminCourseWidgetPlugin.class.php @@ -0,0 +1,42 @@ +<?php +/** + * This plugin interface is used to add functionality to the sidebar of the + * admin courses page. + * + * @see AdminCourseOptionsWidget + * @author Jan-Hendrik Willms <tleilax+studip@gmail.com> + * @since Stud.IP 5.4 + */ +interface AdminCourseWidgetPlugin +{ + /** + * Returns a list of widgets for the admin courses page. + * + * @return AdminCourseOptionsWidget[] + */ + public function getWidgets(): iterable; + + /** + * Return the filter values this widget provides. Return an associative + * array with filter names as indices and filter values as values. + * + * @return array + */ + public function getFilters(): array; + + /** + * Apply the set filters to the AdminCourseFilter query. + * + * @param AdminCourseFilter $filter + */ + public function applyFilters(AdminCourseFilter $filter): void; + + + /** + * Set filters from the admin course page. You will be given an associative + * array according to getFilters(). + * + * @param array $filters + */ + public function setFilters(array $filters): void; +} |
