| @@ 210-223 (lines=14) @@ | ||
| 207 | /** |
|
| 208 | * Delete locations |
|
| 209 | */ |
|
| 210 | protected function delete($step) |
|
| 211 | { |
|
| 212 | $locationCollection = $this->matchLocations('delete', $step); |
|
| 213 | ||
| 214 | $this->setReferences($locationCollection, $step); |
|
| 215 | ||
| 216 | $locationService = $this->repository->getLocationService(); |
|
| 217 | ||
| 218 | foreach ($locationCollection as $location) { |
|
| 219 | $locationService->deleteLocation($location); |
|
| 220 | } |
|
| 221 | ||
| 222 | return $locationCollection; |
|
| 223 | } |
|
| 224 | ||
| 225 | /** |
|
| 226 | * Delete locations sending them to the trash |
|
| @@ 228-241 (lines=14) @@ | ||
| 225 | /** |
|
| 226 | * Delete locations sending them to the trash |
|
| 227 | */ |
|
| 228 | protected function trash($step) |
|
| 229 | { |
|
| 230 | $locationCollection = $this->matchLocations('delete', $step); |
|
| 231 | ||
| 232 | $this->setReferences($locationCollection, $step); |
|
| 233 | ||
| 234 | $trashService = $this->repository->getTrashService(); |
|
| 235 | ||
| 236 | foreach ($locationCollection as $location) { |
|
| 237 | $trashService->trash($location); |
|
| 238 | } |
|
| 239 | ||
| 240 | return $locationCollection; |
|
| 241 | } |
|
| 242 | ||
| 243 | /** |
|
| 244 | * @param string $action |
|