/** * Delete Page * * @param \Magento\Cms\Api\Data\PageInterface $page * @return bool * @throws CouldNotDeleteException */ public function delete(\Magento\Cms\Api\Data\PageInterface $page) { try { $this->resource->delete($page); } catch (\Exception $exception) { throw new CouldNotDeleteException(__('Could not delete the page: %1', $exception->getMessage())); } return true; }
/** * {@inheritdoc} */ public function delete(\Magento\Framework\Model\AbstractModel $object) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'delete'); if (!$pluginInfo) { return parent::delete($object); } else { return $this->___callPlugins('delete', func_get_args(), $pluginInfo); } }