/** * Set parent category * * @param array $queueItem * @return void */ protected function setParentCategory(array $queueItem) { /** @var $category Tx_MooxNews_Domain_Model_Category */ $category = $queueItem['category']; $parentCategoryOriginUid = $queueItem['parentCategoryOriginUid']; if (is_null($parentCategory = $this->postPersistQueue[$parentCategoryOriginUid]['category'])) { $parentCategory = $this->categoryRepository->findOneByImportSourceAndImportId($category->getImportSource(), $parentCategoryOriginUid); } if ($parentCategory !== NULL) { $category->setParentcategory($parentCategory); $this->categoryRepository->update($category); } }