| @@ 225-238 (lines=14) @@ | ||
| 222 | /** |
|
| 223 | * Delete locations |
|
| 224 | */ |
|
| 225 | protected function delete($step) |
|
| 226 | { |
|
| 227 | $locationCollection = $this->matchLocations('delete', $step); |
|
| 228 | ||
| 229 | $this->setReferences($locationCollection, $step); |
|
| 230 | ||
| 231 | $locationService = $this->repository->getLocationService(); |
|
| 232 | ||
| 233 | foreach ($locationCollection as $location) { |
|
| 234 | $locationService->deleteLocation($location); |
|
| 235 | } |
|
| 236 | ||
| 237 | return $locationCollection; |
|
| 238 | } |
|
| 239 | ||
| 240 | /** |
|
| 241 | * Delete locations sending them to the trash |
|
| @@ 243-256 (lines=14) @@ | ||
| 240 | /** |
|
| 241 | * Delete locations sending them to the trash |
|
| 242 | */ |
|
| 243 | protected function trash($step) |
|
| 244 | { |
|
| 245 | $locationCollection = $this->matchLocations('delete', $step); |
|
| 246 | ||
| 247 | $this->setReferences($locationCollection, $step); |
|
| 248 | ||
| 249 | $trashService = $this->repository->getTrashService(); |
|
| 250 | ||
| 251 | foreach ($locationCollection as $location) { |
|
| 252 | $trashService->trash($location); |
|
| 253 | } |
|
| 254 | ||
| 255 | return $locationCollection; |
|
| 256 | } |
|
| 257 | ||
| 258 | /** |
|
| 259 | * @param string $action |
|