diff --git a/Classes/Domain/Model/Event.php b/Classes/Domain/Model/Event.php index c348e8d..b877f71 100644 --- a/Classes/Domain/Model/Event.php +++ b/Classes/Domain/Model/Event.php @@ -176,15 +176,15 @@ class Event extends AbstractEntity * @var ObjectStorage * @Extbase\ORM\Cascade remove */ - protected $images = null; + protected $images; /** * dates * - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Wrm\Events\Domain\Model\Date> + * @var ObjectStorage * @Extbase\ORM\Cascade remove */ - protected $dates = null; + protected $dates; /** * organizer @@ -196,7 +196,7 @@ class Event extends AbstractEntity /** * region * - * @var \Wrm\Events\Domain\Model\Region + * @var Region */ protected $region = null; @@ -208,17 +208,17 @@ class Event extends AbstractEntity /** * categories * - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @var ObjectStorage */ protected $categories; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @var ObjectStorage */ protected $partner; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @var ObjectStorage */ protected $referencesEvents; @@ -232,13 +232,8 @@ class Event extends AbstractEntity */ protected $dataProcessing = null; - /** - * __construct - */ public function __construct() { - - //Do not remove the next line: It would break the functionality $this->initStorageObjects(); } @@ -260,7 +255,10 @@ class Event extends AbstractEntity */ protected function initStorageObjects() { + $this->images = new ObjectStorage(); $this->dates = new ObjectStorage(); + $this->categories = new ObjectStorage(); + $this->partner = new ObjectStorage(); $this->referencesEvents = new ObjectStorage(); } diff --git a/Classes/Service/DestinationDataImportService.php b/Classes/Service/DestinationDataImportService.php index ea2d717..d0b7c85 100644 --- a/Classes/Service/DestinationDataImportService.php +++ b/Classes/Service/DestinationDataImportService.php @@ -671,7 +671,7 @@ class DestinationDataImportService } if ($error !== true) { - if ($this->tmpCurrentEvent->getImages() !== null) { + if ($this->tmpCurrentEvent->getImages()->count() > 0) { $this->logger->info('Relation found'); // TODO: How to delete file references? } else {