KMP PHP API Reference

Department extends BaseEntity
in package

Department Entity - Organizational structure for officer categorization

Groups offices into logical departmental units (e.g., Marshallate, Exchequer, Herald). Serves as top-level organizational unit in the officer hierarchy system.

Tags
see

/docs/5.1-officers-plugin.md

see
DepartmentsTable

Table of Contents

Properties

$branch_id  : int|null
$created  : DateTime
$created_by  : int|null
$deleted  : Date|null
$domain  : string
$id  : int
$modified  : DateTime
$modified_by  : int|null
$name  : string
$offices  : array<string|int, Office>
$_accessible  : array<string, bool>
Fields that can be mass assigned using newEntity() or patchEntity().

Methods

getBranchId()  : int|null
Get the branch ID for authorization checks.

Properties

$branch_id

public int|null $branch_id

Associated branch ID (when applicable)

$created

public DateTime $created

Record creation timestamp

$created_by

public int|null $created_by

User ID who created this record

$deleted

public Date|null $deleted

Soft deletion timestamp

$domain

public string $domain

Operational domain designation

$modified

public DateTime $modified

Last modification timestamp

$modified_by

public int|null $modified_by

User ID who last modified this record

$name

public string $name

Department name (unique, required)

$_accessible

Fields that can be mass assigned using newEntity() or patchEntity().

protected array<string, bool> $_accessible = ['name' => true, 'domain' => true, 'deleted' => true, 'offices' => true]

Methods

getBranchId()

Get the branch ID for authorization checks.

public getBranchId() : int|null

Child classes should override for complex branch relationships.

Return values
int|null

The branch ID, or null if no association


        
On this page

Search results