/** * {@inheritdoc} */ public function delete($id) { /** @var \Magento\Customer\Api\Data\CustomerInterface $customer */ $customer = $this->customerDataFactory->create(); $customer = $this->entityManager->load($customer, $id); try { $this->entityManager->delete($customer); } catch (\Exception $e) { return false; } return true; }
/** * @inheritDoc */ public function delete(AbstractModel $object) { $this->entityManager->delete($object, PageInterface::class); return $this; }
/** * @inheritDoc */ public function delete(AbstractModel $object) { $this->entityManager->delete($object); return $this; }
/** * Delete the object * * @param \Magento\Framework\Model\AbstractModel $object * @return $this * @throws \Exception */ public function delete(AbstractModel $object) { $this->entityManager->delete($object, \Magento\CatalogRule\Api\Data\RuleInterface::class); return $this; }