MDL-59388 calendar: Allow filter to be specified when fetching events
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 19 Jul 2017 01:36:29 +0000 (09:36 +0800)
committerSimey Lameze <simey@moodle.com>
Mon, 14 Aug 2017 01:28:23 +0000 (09:28 +0800)
calendar/classes/local/api.php

index 4eb25fd..e7bddfd 100644 (file)
@@ -70,7 +70,8 @@ class api {
         array $groupsfilter = null,
         array $coursesfilter = null,
         $withduration = true,
-        $ignorehidden = true
+        $ignorehidden = true,
+        callable $filter = null
     ) {
         global $USER;
 
@@ -100,7 +101,8 @@ class api {
             $groupsfilter,
             $coursesfilter,
             $withduration,
-            $ignorehidden
+            $ignorehidden,
+            $filter
         );
     }