getEvent()->getEntity(); if ($entity instanceof AbstractModel) { $entity->beforeDelete(); $entity->getResource()->beforeDelete($entity); } } }