| @@ 143-152 (lines=10) @@ | ||
| 140 | /** | |
| 141 |      * {@inheritdoc} | |
| 142 | */ | |
| 143 | public function addImage($id, Image $image) | |
| 144 |     { | |
| 145 | $this->guardId($id); | |
| 146 | ||
| 147 |         $commandClass = $this->getCommandClass('AddImage'); | |
| 148 | ||
| 149 | return $this->commandBus->dispatch( | |
| 150 | new $commandClass($id, $image) | |
| 151 | ); | |
| 152 | } | |
| 153 | ||
| 154 | /** | |
| 155 |      * {@inheritdoc} | |
| @@ 157-175 (lines=19) @@ | ||
| 154 | /** | |
| 155 |      * {@inheritdoc} | |
| 156 | */ | |
| 157 | public function updateImage( | |
| 158 | $id, | |
| 159 | Image $image, | |
| 160 | String $description, | |
| 161 | String $copyrightHolder | |
| 162 |     ) { | |
| 163 | $this->guardId($id); | |
| 164 | ||
| 165 |         $commandClass = $this->getCommandClass('UpdateImage'); | |
| 166 | ||
| 167 | return $this->commandBus->dispatch( | |
| 168 | new $commandClass( | |
| 169 | $id, | |
| 170 | $image->getMediaObjectId(), | |
| 171 | $description, | |
| 172 | $copyrightHolder | |
| 173 | ) | |
| 174 | ); | |
| 175 | } | |
| 176 | ||
| 177 | /** | |
| 178 | * @param $id | |