/** * Handle category creation * @param array $batch */ protected function handleNewCategory(array $batch) { if (isset($batch['create'])) { foreach ($batch['create'] as $newCategory) { $pimCategory = $newCategory['pimCategory']; $magentoCategoryId = $this->webservice->sendNewCategory($newCategory['magentoCategory']); $magentoUrl = $this->getSoapUrl(); $this->categoryMappingManager->registerCategoryMapping($pimCategory, $magentoCategoryId, $magentoUrl); $this->stepExecution->incrementSummaryInfo(self::CATEGORY_CREATED); } } }