CSRegistry
in package
This API offers an interface to the CONTENTSERV registry
Using the CSRegistry API you can read and write registry entries
Tags
Table of Contents
- getEntries() : array<string|int, mixed>
- returns an array of registry objects
- getEntry() : Registry
- returns a registry entry object
- getValue() : mixed
- returns a registry value
- getValues() : array<string|int, mixed>
- returns all registry values
- setValue() : Registry
- sets a registry value
Methods
getEntries()
returns an array of registry objects
public
static getEntries([string $context = null ][, int $classID = null ][, int $recordID = null ][, int $userID = null ][, string $subcontext = null ][, string $label = '' ][, string $sSortOrder = '' ]) : array<string|int, mixed>
Parameters
- $context : string = null
-
the context
- $classID : int = null
-
the class id of the record
- $recordID : int = null
-
the record id of the record the registry entries belong to
- $userID : int = null
-
the user id of the user the registry entries belong to. if not set, the id of the current user is used.
- $subcontext : string = null
-
the subcontext
- $label : string = ''
-
the label
- $sSortOrder : string = ''
-
the field by which sorting should be done
Tags
Return values
array<string|int, mixed> —array of registry objects
getEntry()
returns a registry entry object
public
static getEntry(string $context[, int $classID = null ][, int $recordID = null ][, int $userID = null ][, string $subcontext = null ][, string $label = '' ]) : Registry
Parameters
- $context : string
-
the context of this registry entry (e.g. "listsettings" or "editorsettings")
- $classID : int = null
-
the class id of the record this registry entry belongs to
- $recordID : int = null
-
the record id of the record this registry entry belongs to
- $userID : int = null
-
the user id of the user this registry entry belongs to. if not set, the id of the current user is used.
- $subcontext : string = null
-
the subcontext
- $label : string = ''
-
the label
Tags
Return values
Registry —a registry object
getValue()
returns a registry value
public
static getValue(string $context, string $key[, string $default = '' ][, int $classID = null ][, int $recordID = null ][, int $userID = null ][, string $subcontext = null ][, string $label = '' ]) : mixed
Parameters
- $context : string
-
the context of this registry entry (e.g. "listsettings" or "editorsettings")
- $key : string
-
the key of the registry setting to return
- $default : string = ''
-
the default value that should be returned if the queried value is not set in the registry
- $classID : int = null
-
the class id of the record this registry entry belongs to
- $recordID : int = null
-
the record id of the record this registry entry belongs to
- $userID : int = null
-
the user id of the user this registry entry belongs to. if not set, the id of the current user is used.
- $subcontext : string = null
-
the subcontext
- $label : string = ''
-
the label
Tags
Return values
mixed —the value stored in the registry entry
getValues()
returns all registry values
public
static getValues(string $context[, int $classID = null ][, int $recordID = null ][, int $userID = null ][, string $subcontext = null ][, string $label = '' ]) : array<string|int, mixed>
Parameters
- $context : string
-
the context of this registry entry (e.g. "listsettings" or "editorsettings")
- $classID : int = null
-
the class id of the record this registry entry belongs to
- $recordID : int = null
-
the record id of the record this registry entry belongs to
- $userID : int = null
-
the user id of the user this registry entry belongs to. if not set, the id of the current user is used.
- $subcontext : string = null
-
the subcontext
- $label : string = ''
-
the label
Tags
Return values
array<string|int, mixed> —an associative array containing all keys inside the registry entry
setValue()
sets a registry value
public
static setValue(string $context, string $key, mixed $value[, int $classID = null ][, int $recordID = null ][, int $userID = null ][, string $subcontext = null ][, string $label = '' ]) : Registry
Parameters
- $context : string
-
the context of this registry entry (e.g. "listsettings" or "editorsettings")
- $key : string
-
the key of the registry setting to return
- $value : mixed
-
the value that should be stored inside the registry
- $classID : int = null
-
the class id of the record this registry entry belongs to
- $recordID : int = null
-
the record id of the record this registry entry belongs to
- $userID : int = null
-
the user id of the user this registry entry belongs to. if not set, the id of the current user is used.
- $subcontext : string = null
-
the subcontext
- $label : string = ''
-
the label
Tags
Return values
Registry —the changed/created registry entry
