@@ -8,17 +8,40 @@ |
||
| 8 | 8 | |
| 9 | 9 | interface ModelRepositoryInterface |
| 10 | 10 | { |
| 11 | + /** |
|
| 12 | + * @return ModelRepository |
|
| 13 | + */ |
|
| 11 | 14 | public function setCrud(CRUD $crud); |
| 12 | 15 | public function get(); |
| 13 | 16 | public function find($id); |
| 14 | 17 | public function delete($id); |
| 15 | 18 | public function store(Request $request); |
| 19 | + |
|
| 20 | + /** |
|
| 21 | + * @return void |
|
| 22 | + */ |
|
| 16 | 23 | public function update($id, Request $request); |
| 17 | 24 | public function updateField($id, Request $request, AbstractField $field, $value); |
| 25 | + |
|
| 26 | + /** |
|
| 27 | + * @return void |
|
| 28 | + */ |
|
| 18 | 29 | public function reorder($id, $idPrev, $idNext); |
| 19 | 30 | public function restore($id); |
| 20 | 31 | public function forceDelete($id); |
| 32 | + |
|
| 33 | + /** |
|
| 34 | + * @return void |
|
| 35 | + */ |
|
| 21 | 36 | public function filter(\Closure $callback); |
| 37 | + |
|
| 38 | + /** |
|
| 39 | + * @return void |
|
| 40 | + */ |
|
| 22 | 41 | public function order(string $column, string $direction); |
| 42 | + |
|
| 43 | + /** |
|
| 44 | + * @return integer|null |
|
| 45 | + */ |
|
| 23 | 46 | public function perPage(int $perPage = null); |
| 24 | 47 | } |
@@ -60,5 +60,9 @@ |
||
| 60 | 60 | abstract protected function init(); |
| 61 | 61 | abstract protected function bound(); |
| 62 | 62 | abstract protected function crud(): CRUD; |
| 63 | + |
|
| 64 | + /** |
|
| 65 | + * @param string $action |
|
| 66 | + */ |
|
| 63 | 67 | abstract protected function can($action): bool; |
| 64 | 68 | } |
@@ -60,5 +60,9 @@ |
||
| 60 | 60 | abstract protected function init(); |
| 61 | 61 | abstract protected function bound(); |
| 62 | 62 | abstract protected function crud(): CRUD; |
| 63 | + |
|
| 64 | + /** |
|
| 65 | + * @param string $action |
|
| 66 | + */ |
|
| 63 | 67 | abstract protected function can($action): bool; |
| 64 | 68 | } |