| @@ 290-297 (lines=8) @@ | ||
| 287 | ||
| 288 | // Fire a LabelsImported for all new labels. |
|
| 289 | $importLabels = new Labels(); |
|
| 290 | foreach ($addedLabels->asArray() as $addedLabel) { |
|
| 291 | $importLabels = $importLabels->with( |
|
| 292 | new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label( |
|
| 293 | new LabelName((string) $addedLabel), |
|
| 294 | $addedLabel->isVisible() |
|
| 295 | ) |
|
| 296 | ); |
|
| 297 | } |
|
| 298 | if ($importLabels->count() > 0) { |
|
| 299 | $this->apply(new LabelsImported( |
|
| 300 | $this->actorId, |
|
| @@ 306-313 (lines=8) @@ | ||
| 303 | ||
| 304 | // Fire a LabelsImported for all new labels. |
|
| 305 | $importLabels = new Labels(); |
|
| 306 | foreach ($addedLabels->asArray() as $addedLabel) { |
|
| 307 | $importLabels = $importLabels->with( |
|
| 308 | new \CultuurNet\UDB3\Model\ValueObject\Taxonomy\Label\Label( |
|
| 309 | new LabelName((string) $addedLabel), |
|
| 310 | $addedLabel->isVisible() |
|
| 311 | ) |
|
| 312 | ); |
|
| 313 | } |
|
| 314 | if ($importLabels->count() > 0) { |
|
| 315 | $this->apply($this->createLabelsImportedEvent($importLabels)); |
|
| 316 | } |
|