1 | <?php |
||
29 | trait FilterTrait |
||
30 | { |
||
31 | /** |
||
32 | * Filter by assign to. |
||
33 | * |
||
34 | * @param Relations\HasMany $query |
||
35 | * @param int $userId |
||
36 | * |
||
37 | * @return void |
||
38 | */ |
||
39 | 6 | public function filterAssignTo(Relations\HasMany $query, $userId) |
|
45 | |||
46 | /** |
||
47 | * Filter by tag. |
||
48 | * |
||
49 | * @param Relations\HasMany $query |
||
50 | * @param string $tags |
||
51 | * |
||
52 | * @return void |
||
53 | */ |
||
54 | 5 | public function filterTags(Relations\HasMany $query, $tags) |
|
63 | |||
64 | /** |
||
65 | * Filter the title or body by keyword. |
||
66 | * |
||
67 | * @param Relations\HasMany $query |
||
68 | * @param string $keyword |
||
69 | * |
||
70 | * @return void |
||
71 | */ |
||
72 | 6 | public function filterTitleOrBody(Relations\HasMany $query, $keyword) |
|
81 | |||
82 | /** |
||
83 | * Filter by created by. |
||
84 | * |
||
85 | * @param Relations\HasMany $query |
||
86 | * @param int $userId |
||
87 | * @param bool $enabled |
||
88 | * |
||
89 | * @return void |
||
90 | */ |
||
91 | public function filterCreatedBy(Relations\HasMany $query, $userId, $enabled = false) |
||
97 | } |
||
98 |