public function delete(EntityInterface $entity) { $id = $entity->getId(); $this->clearCategories($id); return parent::delete($entity); }
/** * @param integer|string|EntityInterface $object * @return integer */ public function filterPartObject2Id($object) { return (int) ($object instanceof EntityInterface) ? $object->getId() : $object; }
public function delete(EntityInterface $entity) { return $this->deleteById($entity->getId()); }