| @@ 124-131 (lines=8) @@ | ||
| 121 | * |
|
| 122 | * @return Country |
|
| 123 | */ |
|
| 124 | public function addItem(Item $item) |
|
| 125 | { |
|
| 126 | if (!$this->items->contains($item)) { |
|
| 127 | $this->items->add($item); |
|
| 128 | $item->setCountry($this); |
|
| 129 | } |
|
| 130 | ||
| 131 | return $this; |
|
| 132 | } |
|
| 133 | ||
| 134 | /** |
|
| @@ 139-146 (lines=8) @@ | ||
| 136 | * |
|
| 137 | * @return Country |
|
| 138 | */ |
|
| 139 | public function removeItem(Item $item) |
|
| 140 | { |
|
| 141 | if ($this->items->contains($item)) { |
|
| 142 | $this->items->removeElement($item); |
|
| 143 | $item->setCountry(null); |
|
| 144 | } |
|
| 145 | ||
| 146 | return $this; |
|
| 147 | } |
|
| 148 | ||
| 149 | /** |
|