GlobalDisplaySettingsRepository
in package
Repository for managing global display mode settings.
Admin-configurable defaults that apply to all users unless overridden.
Table of Contents
Methods
- getAllGlobalSettings() : Collection
- Get all global settings.
- getAuditLog() : Collection
- Get audit log entries.
- getAvailableModes() : array<string|int, string>
- Get available modes for a module.
- getGlobalSettings() : array<string, mixed>|null
- Get global settings for a module.
- isUserOverrideAllowed() : bool
- Check if user override is allowed for a module.
- resetToDefaults() : bool
- Reset a module to default settings.
- saveGlobalSettings() : bool
- Save global settings for a module.
Methods
getAllGlobalSettings()
Get all global settings.
public
getAllGlobalSettings([bool $activeOnly = true ]) : Collection
Parameters
- $activeOnly : bool = true
-
Only return active settings
Return values
CollectiongetAuditLog()
Get audit log entries.
public
getAuditLog([array<string, mixed> $filters = [] ][, int $limit = 100 ]) : Collection
Parameters
- $filters : array<string, mixed> = []
-
Filter options
- $limit : int = 100
-
Max entries
Return values
CollectiongetAvailableModes()
Get available modes for a module.
public
getAvailableModes(string $module) : array<string|int, string>
Parameters
- $module : string
-
Module name
Return values
array<string|int, string>getGlobalSettings()
Get global settings for a module.
public
getGlobalSettings(string $module) : array<string, mixed>|null
Parameters
- $module : string
-
Module name
Return values
array<string, mixed>|nullisUserOverrideAllowed()
Check if user override is allowed for a module.
public
isUserOverrideAllowed(string $module) : bool
Parameters
- $module : string
-
Module name
Return values
boolresetToDefaults()
Reset a module to default settings.
public
resetToDefaults(string $module[, int|null $changedBy = null ]) : bool
Parameters
- $module : string
-
Module name
- $changedBy : int|null = null
-
User ID making the change
Return values
boolsaveGlobalSettings()
Save global settings for a module.
public
saveGlobalSettings(string $module, array<string, mixed> $settings[, int|null $changedBy = null ]) : bool
Parameters
- $module : string
-
Module name
- $settings : array<string, mixed>
-
Settings data
- $changedBy : int|null = null
-
User ID making the change