ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
TodoItem.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
25 public function __construct(
26 private int $todo_id,
27 private int $user_id,
28 private string $title,
29 private ?string $description,
30 private ?string $deadline
31 ) {
32 }
33
37 public function getTodoId(): int
38 {
39 return $this->todo_id;
40 }
41
45 public function getUserId(): int
46 {
47 return $this->user_id;
48 }
49
53 public function getTitle(): string
54 {
55 return $this->title;
56 }
57
61 public function getDescription(): ?string
62 {
63 return $this->description;
64 }
65
69 public function getDeadline(): ?string
70 {
71 return $this->deadline;
72 }
73
77 public function widthTodoId(int $todo_id): TodoItem
78 {
79 $clone = clone $this;
80 $clone->todo_id = $todo_id;
81 return $clone;
82 }
83}
getUserId()
Get the id of the user to which the item belongs.
Definition: TodoItem.php:45
__construct(private int $todo_id, private int $user_id, private string $title, private ?string $description, private ?string $deadline)
Definition: TodoItem.php:25
getDescription()
Get a description of the item (optional)
Definition: TodoItem.php:61
getDeadline()
Get the deadline of the item (optional)
Definition: TodoItem.php:69
widthTodoId(int $todo_id)
Get a clone with a new id.
Definition: TodoItem.php:77
getTitle()
Get the title of the item.
Definition: TodoItem.php:53
getTodoId()
Get the id of the item.
Definition: TodoItem.php:37