public function __construct($task) { $this->task = $task; $this->subtasks = Subtask::getSubtasks($this->task->task_id); }