SettingsManager Class
The settings manager keeps track of all Canteen settings and provides protection and access control when doing page rendering. All important global settings are registered here.
Item Index
Methods
Methods
addSetting
-
name
-
value
-
[access=0]
Add a single setting to the settings manager
Parameters:
-
name
StringThe name of the property add
-
value
MixedThe value of the setting
-
[access=0]
Int optionalThe access to enable for access, default to none
Returns:
Make it easier to chain
addSettings
-
settings
-
[access=0]
Add a collection of settings to the settings manager
Parameters:
-
settings
DictionaryThe associative-array of properties
-
[access=0]
Int optionalThe access to enable for access, default to none
Returns:
Make it easier to chain
exists
-
args
If multiple settings exist
Parameters:
-
args
String multipleThe data names that are required
Returns:
If the access check out
exists
-
args
If multiple settings exist, throw exception if not
Parameters:
-
args
String multipleThe data names that are required
Returns:
If the access check out
getClient
()
Dictionary
Get the collection of settings that are okay-ed for use by the client
Returns:
The collection of settings
getRender
()
Dictionary
Get the collection of settings that are okay to render through templates
Returns:
The collection of settings
Properties
ALL
Int
final
static
Enable all access
CLIENT
Int
final
static
Option if the setting should be available to the client, JavaScript
DELETE
Int
final
static
Option if the option can be deleted from the config panel
RENDER
Int
final
static
Option if the setting can be rendered on the page
settingsMap
Dictionary
private
The dictionary map of all settings
WRITE
Int
final
static
Option if the option can be changed from the config panel