/**
  * {@inheritdoc}
  */
 protected function doExecute(StepExecution $stepExecution)
 {
     // inject the step execution in the step item to be able to log summary info during execution
     $this->cleaner->setStepExecution($stepExecution);
     try {
         $this->cleaner->execute();
     } catch (InvalidItemException $e) {
         $this->handleStepExecutionWarning($stepExecution, $this->cleaner, $e);
     }
 }
 /**
  * {@inheritdoc}
  */
 public function execute()
 {
     parent::beforeExecute();
     $prestashopCategories = $this->webservice->getCategoriesStatus();
     foreach ($prestashopCategories as $category) {
         if (!$this->categoryMappingManager->prestashopCategoryExists($category['category_id'], $this->getPrestashopUrl()) && !($category['level'] === '0' || $category['level'] === '1')) {
             try {
                 $this->handleCategoryNotInPimAnymore($category);
             } catch (RestCallException $e) {
                 throw new InvalidItemException($e->getMessage(), [json_encode($category)]);
             }
         }
     }
 }
 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     return array_merge(parent::getConfigurationFields(), ['notInPimAnymoreAction' => ['type' => 'choice', 'options' => ['choices' => [Cleaner::DO_NOTHING => 'pim_prestashop_connector.export.do_nothing.label', Cleaner::DELETE => 'pim_prestashop_connector.export.delete.label'], 'required' => true, 'help' => 'pim_prestashop_connector.export.notInPimAnymoreAction.help', 'label' => 'pim_prestashop_connector.export.notInPimAnymoreAction.label', 'attr' => ['class' => 'select2']]], 'forceAttributeSetRemoval' => ['type' => 'checkbox', 'options' => ['help' => 'pim_prestashop_connector.export.forceAttributeSetRemoval.help', 'label' => 'pim_prestashop_connector.export.forceAttributeSetRemoval.label']]]);
 }
 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     $configurationFields = parent::getConfigurationFields();
     $configurationFields['notInPimAnymoreAction']['options']['choices'] = [Cleaner::DO_NOTHING => 'pim_prestashop_connector.export.do_nothing.label', Cleaner::DELETE => 'pim_prestashop_connector.export.delete.label'];
     $configurationFields['notInPimAnymoreAction']['options']['help'] = 'pim_prestashop_connector.export.notInPimAnymoreAction.help';
     $configurationFields['notInPimAnymoreAction']['options']['label'] = 'pim_prestashop_connector.export.notInPimAnymoreAction.label';
     return $configurationFields;
 }
 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     $configurationFields = parent::getConfigurationFields();
     $configurationFields['notInPimAnymoreAction']['options']['choices'] = [Cleaner::DO_NOTHING => 'pim_prestashop_connector.export.do_nothing.label', Cleaner::DELETE => 'pim_prestashop_connector.export.delete.label'];
     $configurationFields['notInPimAnymoreAction']['options']['help'] = 'pim_prestashop_connector.export.notInPimAnymoreAction.help';
     $configurationFields['notInPimAnymoreAction']['options']['label'] = 'pim_prestashop_connector.export.notInPimAnymoreAction.label';
     return array_merge($configurationFields, $this->attributeCodeMappingMerger->getConfigurationField());
 }
 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     return array_merge(parent::getConfigurationFields(), ['notCompleteAnymoreAction' => ['type' => 'choice', 'options' => ['choices' => [Cleaner::DO_NOTHING => 'pim_prestashop_connector.export.do_nothing.label', Cleaner::DISABLE => 'pim_prestashop_connector.export.disable.label', Cleaner::DELETE => 'pim_prestashop_connector.export.delete.label'], 'required' => true, 'help' => 'pim_prestashop_connector.export.notCompleteAnymoreAction.help', 'label' => 'pim_prestashop_connector.export.notCompleteAnymoreAction.label', 'attr' => ['class' => 'select2']]], 'channel' => ['type' => 'choice', 'options' => ['choices' => $this->channelManager->getChannelChoices(), 'required' => true]], 'removeProductsNotHandledByPim' => ['type' => 'checkbox', 'options' => ['help' => 'pim_prestashop_connector.export.removeProductsNotHandledByPim.help', 'label' => 'pim_prestashop_connector.export.removeProductsNotHandledByPim.label']]]);
 }