The class encapsulates a single privilege record with its three states of
ALLOWED, DENIED and INHERITED.
It requires the privilege widget for correct display.
Note, that magic class privileges are currently not supported by this type. Only
content-, not self-style privileges are managed by it.
Available configuration options:
- string privilege_name: The name of the privilege to manage. Must be set.
- string assignee: The assignee of the privilege to manage. Must be set.
This startup handler validates that the class is populated correctly.
Loads the privilege from the DB if and only if a storage object is already present
and we have sufficient privileges.
Writes the privilege to the DB unless the privilege member is still null (in which
case the inherited default will kick in).
In all other cases the type will have
already populated storage->object with a temporary object in set_value().
Returns the current privilege value, defaulting to MIDCOM_PRIVILEGE_INHERIT in case the
privilege is yet unset.
set_value (int $value)
Sets the privileges value.
If the privilege record has not yet been created,
it creates a new one (getting a temporary object from the DM core if
intThe new value of the privilege.
The name assignee of the privilege to manage (f.x.
Classname the privilege applies to
The privilege record encapsulated by this type (note that this does not
necessarily is an already persisted privilege).
This member may be null in case that we do not yet have a storage object.
Setting/getting the value of this type must thus not be done directly
in this member but using the get/set_value accessors.
The name of the privilege to manage (f.x.