public function delete(\Smile\ElasticsuiteCatalogOptimizer\Api\Data\OptimizerInterface $optimizer)
    {
        $optimizerId = $optimizer->getId();

        $this->entityManager->delete($optimizer);

        if (isset($this->optimizerRepositoryById[$optimizerId])) {
            unset($this->optimizerRepositoryById[$optimizerId]);
        }

        return $optimizer;
    }
public function delete(\Smile\ElasticsuiteCatalogOptimizer\Api\Data\OptimizerInterface $optimizer)
    {
        $optimizerId = $optimizer->getId();

        $this->entityManager->delete($optimizer);

        if (isset($this->optimizerRepositoryById[$optimizerId])) {
            unset($this->optimizerRepositoryById[$optimizerId]);
        }

        return $optimizer;
    }
public function delete ( \ Smile \ ElasticsuiteCatalogOptimizer \ Api \ Data \ OptimizerInterface $ optimizer ) { $ optimizerId = $ optimizer -> getId ( ) ; $ this -> entityManager -> delete ( $ optimizer ) ; if ( isset ( $ this -> optimizerRepositoryById [ $ optimizerId ] ) ) { unset ( $ this -> optimizerRepositoryById [ $ optimizerId ] ) ; } return $ optimizer ; }
delete a optimizer

@param \Smile\ElasticsuiteCatalogOptimizer\Api\Data\OptimizerInterface $optimizer Optimizer

@return \Smile\ElasticsuiteCatalogOptimizer\Api\Data\OptimizerInterface
@throws \Magento\Framework\Exception\NoSuchEntityException
delete a optimizer