code: public function isDeletable(): bool
      {
          $rolesEntityMapper = RolesEntityMapper::getInstance();
          return !$rolesEntityMapper->hasAdministrator($this->id) && !$rolesEntityMapper->hasPermissionAssigned($this->id);
      }
docs: whether this model is allowed to be deleted
  do not allow roles in use (assigned to administrators) to be deleted