OfficerManagerInterface
in
Service contract for shared officer release and recalculation operations.
Officer hire now runs exclusively through workflow definitions. This interface remains for shared release and recalculation logic reused by controllers and workflow actions.
Tags
Table of Contents
Methods
- recalculateOfficersForOffice() : ServiceResult
- Recalculate reporting relationships and roles for all officers of an office.
- release() : ServiceResult
- Release a member from an office position.
Methods
recalculateOfficersForOffice()
Recalculate reporting relationships and roles for all officers of an office.
public
recalculateOfficersForOffice(int $officeId, int $updaterId) : ServiceResult
Call when office deputy_to_id, reports_to_id, or grants_role_id changes. Processes all current and upcoming officers with fail-fast error handling.
Parameters
- $officeId : int
-
Office identifier for recalculation
- $updaterId : int
-
Administrator identifier for audit trail
Return values
ServiceResult —Success with counts (updated_count, current_count, upcoming_count), or failure with specific member/office/branch identification
release()
Release a member from an office position.
public
release(int $officerId, int $revokerId, DateTime $revokedOn, string|null $revokedReason[, string $releaseStatus = Officer::RELEASED_STATUS ]) : ServiceResult
Handles ActiveWindow termination, warrant cancellation for warrant-required offices, and release notifications.
Parameters
- $officerId : int
-
Officer record identifier
- $revokerId : int
-
Administrator identifier for audit trail
- $revokedOn : DateTime
-
Effective release date
- $revokedReason : string|null
-
Optional reason for release
- $releaseStatus : string = Officer::RELEASED_STATUS
-
Status to apply when ending the assignment
Return values
ServiceResult —Success or failure with reason