/** * Performs a GET for a task ID on the resource. * @param Task $task - The task id. * @return ArrayCollection */ public function forTask(Task $task) { return $this->getItemsForAttribute($this->getBaseUrl(), 'task_id', $task->getId(), "ArrayCollection<{$this->type}>"); }
public function forTask(Task $task, $completed = false) { $params = ['task_id' => $task->getId(), 'completed' => $completed]; return $this->getItemsForAttributes($this->getBaseUrl(), $params, "ArrayCollection<{$this->type}>"); }