1 | <?php |
||
30 | class CardController extends Controller { |
||
31 | |||
32 | private $userId; |
||
33 | private $cardService; |
||
34 | |||
35 | public function __construct($appName, IRequest $request, CardService $cardService, $userId) { |
||
40 | |||
41 | /** |
||
42 | * @NoAdminRequired |
||
43 | * @param $cardId |
||
44 | * @return \OCP\AppFramework\Db\Entity |
||
45 | */ |
||
46 | public function read($cardId) { |
||
49 | |||
50 | /** |
||
51 | * @NoAdminRequired |
||
52 | * @param $cardId |
||
53 | * @param $stackId |
||
54 | * @param $order |
||
55 | * @return array |
||
56 | */ |
||
57 | public function reorder($cardId, $stackId, $order) { |
||
60 | |||
61 | /** |
||
62 | * @NoAdminRequired |
||
63 | * @param $cardId |
||
64 | * @param $title |
||
65 | * @return \OCP\AppFramework\Db\Entity |
||
66 | */ |
||
67 | public function rename($cardId, $title) { |
||
70 | |||
71 | /** |
||
72 | * @NoAdminRequired |
||
73 | * @param $title |
||
74 | * @param $stackId |
||
75 | * @param $type |
||
76 | * @param int $order |
||
77 | * @return \OCP\AppFramework\Db\Entity |
||
78 | */ |
||
79 | public function create($title, $stackId, $type = 'plain', $order = 999) { |
||
82 | |||
83 | /** |
||
84 | * @NoAdminRequired |
||
85 | * @param $id |
||
86 | * @param $title |
||
87 | * @param $stackId |
||
88 | * @param $type |
||
89 | * @param $order |
||
90 | * @param $description |
||
91 | * @param $duedate |
||
92 | * @param $deletedAt |
||
93 | * @return \OCP\AppFramework\Db\Entity |
||
94 | */ |
||
95 | public function update($id, $title, $stackId, $type, $order, $description, $duedate, $deletedAt) { |
||
98 | |||
99 | /** |
||
100 | * @NoAdminRequired |
||
101 | * @param $cardId |
||
102 | * @return \OCP\AppFramework\Db\Entity |
||
103 | */ |
||
104 | public function delete($cardId) { |
||
107 | |||
108 | /** |
||
109 | * @NoAdminRequired |
||
110 | * @param $boardId |
||
111 | * @return \OCP\AppFramework\Db\Entity |
||
112 | */ |
||
113 | public function deleted($boardId) { |
||
116 | |||
117 | /** |
||
118 | * @NoAdminRequired |
||
119 | * @param $cardId |
||
120 | * @return \OCP\AppFramework\Db\Entity |
||
121 | */ |
||
122 | public function archive($cardId) { |
||
125 | |||
126 | /** |
||
127 | * @NoAdminRequired |
||
128 | * @param $cardId |
||
129 | * @return \OCP\AppFramework\Db\Entity |
||
130 | */ |
||
131 | public function unarchive($cardId) { |
||
134 | |||
135 | /** |
||
136 | * @NoAdminRequired |
||
137 | * @param $cardId |
||
138 | * @param $labelId |
||
139 | */ |
||
140 | public function assignLabel($cardId, $labelId) { |
||
143 | |||
144 | /** |
||
145 | * @NoAdminRequired |
||
146 | * @param $cardId |
||
147 | * @param $labelId |
||
148 | */ |
||
149 | public function removeLabel($cardId, $labelId) { |
||
152 | |||
153 | /** |
||
154 | * @NoAdminRequired |
||
155 | */ |
||
156 | public function assignUser($cardId, $userId) { |
||
159 | |||
160 | /** |
||
161 | * @NoAdminRequired |
||
162 | */ |
||
163 | public function unassignUser($cardId, $userId) { |
||
166 | |||
167 | |||
168 | |||
169 | } |
||
170 |