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