isAdmin()) return true; if ($user->id === $entity->get('createdById')) return true; return false; } public function checkEntityDelete(EntityUser $user, Entity $entity, $data) { if ($user->isAdmin()) return true; if ($user->id === $entity->get('createdById')) return true; return false; } }