1 | <?php |
||
22 | class TaskController extends Controller |
||
23 | { |
||
24 | /** |
||
25 | * Get the tasks for applied filter. |
||
26 | * |
||
27 | * @param int $project_id |
||
28 | * @param string $query |
||
29 | * |
||
30 | * @return array |
||
31 | */ |
||
32 | public function searchTasks($project_id, $query) |
||
38 | |||
39 | /** |
||
40 | * Fetch a task by the id. |
||
41 | * |
||
42 | * @param int $task_id Task id |
||
43 | * |
||
44 | * @return array |
||
45 | */ |
||
46 | public function getTask($task_id) |
||
52 | |||
53 | /** |
||
54 | * Fetch a task by the reference (external id). |
||
55 | * |
||
56 | * @param int $project_id Project id |
||
57 | * @param string $reference Task reference |
||
58 | * |
||
59 | * @return array |
||
60 | */ |
||
61 | public function getTaskByReference($project_id, $reference) |
||
67 | |||
68 | /** |
||
69 | * Get all tasks for a given project and status. |
||
70 | * |
||
71 | * @param int $project_id Project id |
||
72 | * @param int $status_id Status id |
||
73 | * |
||
74 | * @return array |
||
75 | */ |
||
76 | public function getAllTasks($project_id, $status_id = TaskModel::STATUS_OPEN) |
||
82 | |||
83 | /** |
||
84 | * Get a list of overdue tasks for all projects. |
||
85 | * |
||
86 | * @return array |
||
87 | */ |
||
88 | public function getOverdueTasks() |
||
92 | |||
93 | /** |
||
94 | * Get a list of overdue tasks by project. |
||
95 | * |
||
96 | * @param int $project_id |
||
97 | * |
||
98 | * @return array |
||
99 | */ |
||
100 | public function getOverdueTasksByProject($project_id) |
||
106 | |||
107 | /** |
||
108 | * Mark a task open. |
||
109 | * |
||
110 | * @param int $task_id Task id |
||
111 | * |
||
112 | * @return bool |
||
113 | */ |
||
114 | public function openTask($task_id) |
||
120 | |||
121 | /** |
||
122 | * Mark a task closed. |
||
123 | * |
||
124 | * @param int $task_id Task id |
||
125 | * |
||
126 | * @return bool |
||
127 | */ |
||
128 | public function closeTask($task_id) |
||
134 | |||
135 | /** |
||
136 | * Remove a task. |
||
137 | * |
||
138 | * @param int $task_id Task id |
||
139 | * |
||
140 | * @return bool |
||
141 | */ |
||
142 | public function removeTask($task_id) |
||
148 | |||
149 | /** |
||
150 | * Move a task to another column or to another position. |
||
151 | * |
||
152 | * @param int $project_id Project id |
||
153 | * @param int $task_id Task id |
||
154 | * @param int $column_id Column id |
||
155 | * @param int $position Position (must be >= 1) |
||
156 | * @param int $swimlane_id Swimlane id |
||
157 | * @param bool $fire_events Fire events |
||
158 | * @param bool $onlyOpen Do not move closed tasks |
||
159 | * |
||
160 | * @return bool |
||
161 | */ |
||
162 | public function moveTaskPosition($project_id, $task_id, $column_id, $position, $swimlane_id = 0) |
||
168 | |||
169 | /** |
||
170 | * Move a task to another project. |
||
171 | * |
||
172 | * @param int $task_id |
||
173 | * @param int $project_id |
||
174 | * @param int $swimlane_id |
||
175 | * @param int $column_id |
||
176 | * @param int $category_id |
||
177 | * @param int $owner_id |
||
178 | * |
||
179 | * @return bool |
||
180 | */ |
||
181 | public function moveTaskToProject($task_id, $project_id, $swimlane_id = null, $column_id = null, $category_id = null, $owner_id = null) |
||
187 | |||
188 | /** |
||
189 | * Duplicate a task to another project. |
||
190 | * |
||
191 | * @param int $task_id |
||
192 | * @param int $project_id |
||
193 | * @param int $swimlane_id |
||
194 | * @param int $column_id |
||
195 | * @param int $category_id |
||
196 | * @param int $owner_id |
||
197 | * |
||
198 | * @return bool|int |
||
199 | */ |
||
200 | public function duplicateTaskToProject($task_id, $project_id, $swimlane_id = null, $column_id = null, $category_id = null, $owner_id = null) |
||
206 | |||
207 | /** |
||
208 | * Create a task. |
||
209 | * |
||
210 | * @param string $title |
||
211 | * @param int $project_id |
||
212 | * @param string $color_id |
||
213 | * @param int $column_id |
||
214 | * @param int $owner_id |
||
215 | * @param int $creator_id |
||
216 | * @param string $date_due |
||
217 | * @param string $description |
||
218 | * @param int $category_id |
||
219 | * @param int $score |
||
220 | * @param int $swimlane_id |
||
221 | * @param int $priority |
||
222 | * @param int $recurrence_status |
||
223 | * @param int $recurrence_trigger |
||
224 | * @param int $recurrence_factor |
||
225 | * @param int $recurrence_timeframe |
||
226 | * @param int $recurrence_basedate |
||
227 | * @param string $reference |
||
228 | * |
||
229 | * @return int |
||
230 | */ |
||
231 | public function createTask($title, $project_id, $color_id = '', $column_id = 0, $owner_id = 0, $creator_id = 0, |
||
271 | |||
272 | /** |
||
273 | * Update a task. |
||
274 | * |
||
275 | * @param int $id |
||
276 | * @param string $title |
||
277 | * @param int $project_id |
||
278 | * @param string $color_id |
||
279 | * @param int $column_id |
||
280 | * @param int $owner_id |
||
281 | * @param int $creator_id |
||
282 | * @param string $date_due |
||
283 | * @param string $description |
||
284 | * @param int $category_id |
||
285 | * @param int $score |
||
286 | * @param int $swimlane_id |
||
287 | * @param int $priority |
||
288 | * @param int $recurrence_status |
||
289 | * @param int $recurrence_trigger |
||
290 | * @param int $recurrence_factor |
||
291 | * @param int $recurrence_timeframe |
||
292 | * @param int $recurrence_basedate |
||
293 | * @param string $reference |
||
294 | * |
||
295 | * @return int |
||
296 | */ |
||
297 | public function updateTask($id, $title = null, $color_id = null, $owner_id = null, |
||
335 | } |
||
336 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.