// Only app lifecycle hooks can be received if app is deactivated
if (!
$app->
isActive() && !
($event instanceof AppChangedEvent ||
$event instanceof AppDeletedEvent
)) { return false;
} if (!
($this->privileges
[$event->
getName()] ?? null
)) { $this->
loadPrivileges($event->
getName(),
$affectedRoles);
} $privileges =
$this->privileges
[$event->
getName()][$app->
getAclRoleId()] ??
new AclPrivilegeCollection([]);
if (!
$event->
isAllowed($app->
getId(),
$privileges)) { return false;
} return true;
} /**
* @param array<string> $affectedRoleIds
*/