Bläddra i källkod

groups filter

tags/0.1.0
Robin Thoni 8 år sedan
förälder
incheckning
ba2119bb3a

+ 3
- 2
src/Auth/Controller/LuticateGroupsController.php Visa fil

26
      * Get all groups
26
      * Get all groups
27
      * @param int $page The page number, 0 based
27
      * @param int $page The page number, 0 based
28
      * @param int $perPage The number of items per page
28
      * @param int $perPage The number of items per page
29
+     * @param string $query The filter query
29
      * @return \Luticate\Utils\LuMultipleDbo
30
      * @return \Luticate\Utils\LuMultipleDbo
30
      */
31
      */
31
-    public function getAll($page = 0, $perPage = PHP_INT_MAX)
32
+    public function getAll($page = 0, $perPage = PHP_INT_MAX, $query = "")
32
     {
33
     {
33
-        return LuticateGroupsBusiness::getAll($page, $perPage);
34
+        return LuticateGroupsBusiness::getAll($page, $perPage, $query);
34
     }
35
     }
35
 
36
 
36
     /**
37
     /**

+ 5
- 0
src/Auth/DataAccess/LuticateGroupsDataAccess.php Visa fil

20
         return array(array("name", "ASC"));
20
         return array(array("name", "ASC"));
21
     }
21
     }
22
 
22
 
23
+    protected static function getQueryPredicate($query)
24
+    {
25
+        return array(array("name", "ilike", "%" . $query . "%", "or"));
26
+    }
27
+
23
     /**
28
     /**
24
      * @param $group_name
29
      * @param $group_name
25
      * @return LuticateGroupsDbo|null
30
      * @return LuticateGroupsDbo|null

Laddar…
Avbryt
Spara