jPrefItem
in package
Tags
Table of Contents
- $allowed_types : mixed
- $default_value : mixed
- $group : string
- name of the group it belongs to. It allows jpref_admin to groups preferences.
- $id : string
- $locale : mixed
- the locale selector for its label, shown into a form to set or see the value (jpref_admin).
- $read_acl_subject : string
- the jacl2 subject for the right to see the value of the preference in jpref_admin.
- $type : string
- $value : mixed
- $write_acl_subject : string
- the jacl2 subject for the right to modify the value of the preference in jpref_admin.
- $_readable : mixed
- $_writable : mixed
- compareGroup() : mixed
- Compare 2 group.
- isReadable() : mixed
- Current user can read this pref.
- isWritable() : mixed
- Current user can write this pref.
- loadValue() : mixed
- Load the value of the pref via jPref.
- setFromIniNode() : mixed
- Initialise the pref with a node from an ini content.
Properties
$allowed_types
public
static mixed
$allowed_types
= array('integer', 'decimal', 'string', 'boolean')
$default_value
public
mixed
$default_value
the default value of the preference
$group
name of the group it belongs to. It allows jpref_admin to groups preferences.
public
string
$group
= ''
$id
public
string
$id
the identifiant of the preference
$locale
the locale selector for its label, shown into a form to set or see the value (jpref_admin).
public
mixed
$locale
= ''
$read_acl_subject
the jacl2 subject for the right to see the value of the preference in jpref_admin.
public
string
$read_acl_subject
if empty: everybody can read the preference.
$type
public
string
$type
= 'string'
the value type of the preference : 'integer', 'decimal', 'string', 'boolean'
$value
public
mixed
$value
= ''
the value
$write_acl_subject
the jacl2 subject for the right to modify the value of the preference in jpref_admin.
public
string
$write_acl_subject
if empty: everybody can modify the preference.
$_readable
protected
mixed
$_readable
$_writable
protected
mixed
$_writable
Methods
compareGroup()
Compare 2 group.
public
static compareGroup(jPrefItemGroup $a, jPrefItemGroup $b) : mixed
Parameters
- $a : jPrefItemGroup
-
the first group
- $b : jPrefItemGroup
-
the second group
Tags
Return values
mixed —isReadable()
Current user can read this pref.
public
isReadable() : mixed
Return values
mixed —isWritable()
Current user can write this pref.
public
isWritable() : mixed
Return values
mixed —loadValue()
Load the value of the pref via jPref.
public
loadValue() : mixed
Return values
mixed —setFromIniNode()
Initialise the pref with a node from an ini content.
public
setFromIniNode(string $node_key, array<string|int, mixed> $node) : mixed
Parameters
- $node_key : string
-
the name of the section ("pref:something")
- $node : array<string|int, mixed>
-
list of key/value