public function confirm($id) { // Confirm changes using a command and a handler, again this would normally be done via mapping // and maybe split across some files. $command = new ConfirmPendingChangesCommand(TaskListId::fromString($id)); $this->taskListService->handleConfirmPendingChanges($command); return redirect()->route('lists.show', [$id, 'success' => true]); }
/** * {@inheritDoc} */ public static function deserialize($aggregateId, array $data) { return new static(TaskListId::fromString($aggregateId)); }
/** * {@inheritDoc} */ public static function deserialize($aggregateId, array $data) { $taskListId = TaskListId::fromString($aggregateId); $taskId = TaskId::fromString($data['taskId']); return new static($taskListId, $taskId, $data['taskDescription'], $data['taskPriority']); }