/** * Removes a product by its associated id * * @param string $id Product id * @return boolean */ private function removeById($id) { // Remove from a storage first $this->productMapper->deleteById($id); $this->imageMapper->deleteAllByProductId($id); // Now remove from the file-system $this->imageManager->delete($id); return true; }