SystemOverviewSettings extends SystemOverviewModel
System Overview settings
Table of Contents
Properties
| $default_settings |
Methods
| __construct() | Initialize |
| add() | Adds new staff settings for the System Overview settings |
| addDefault() | Saves the default settings for the given staff member |
| getSettings() | Retrieves a list of all system overview settings for a given staff member |
Properties
$default_settings
private
static array<string|int, mixed>
$default_settings
= [['key' => 'clients_active', 'value' => 1, 'order' => 1], ['key' => 'active_users_today', 'value' => 1, 'order' => 2], ['key' => 'services_active', 'value' => 1, 'order' => 3], ['key' => 'services_scheduled_cancellation', 'value' => 0, 'order' => 4], ['key' => 'recurring_invoices', 'value' => 1, 'order' => 5], ['key' => 'pending_orders', 'value' => 0, 'order' => 6], ['key' => 'open_tickets', 'value' => 0, 'order' => 7], ['key' => 'show_one_tab', 'value' => 0, 'order' => 8], ['key' => 'graph_clients', 'value' => 1, 'order' => 9], ['key' => 'graph_services', 'value' => 1, 'order' => 10], ['key' => 'show_legend', 'value' => 1, 'order' => 11], ['key' => 'date_range', 'value' => 7, 'order' => 12]]
A list of default system overview settings
Methods
__construct()
Initialize
public
__construct() : mixed
add()
Adds new staff settings for the System Overview settings
public
add(int $staff_id, int $company_id, array<string|int, mixed> $vars) : mixed
Parameters
- $staff_id : int
-
The ID of the staff member whose settings to update
- $company_id : int
-
The ID of the company to which this staff member belongs
- $vars : array<string|int, mixed>
-
A numerically-indexed list of overview setting key/value pairs
addDefault()
Saves the default settings for the given staff member
public
addDefault(int $staff_id, int $company_id) : mixed
Parameters
- $staff_id : int
-
The ID of the staff member whose settings to update
- $company_id : int
-
The ID of the company to which this staff member belongs
getSettings()
Retrieves a list of all system overview settings for a given staff member
public
getSettings(int $staff_id, int $company_id[, mixed $order_by = ['order' => 'asc'] ]) : array<string|int, mixed>
Parameters
- $staff_id : int
-
The staff ID of the staff member to get settings for
- $company_id : int
-
The company ID to which the staff member belongs
- $order_by : mixed = ['order' => 'asc']
Return values
array<string|int, mixed> —A list of system overview settings for the given staff member