public function setPermissionObject(Set $fs) { $this->permissionObject = $fs; if ($fs->overrideGlobalPermissions()) { $this->permissionObjectToCheck = $fs; } else { $fs = Set::getGlobal(); $this->permissionObjectToCheck = $fs; } }