The DataTreeObject_Permission constructor. Just makes sure to call the parent constructor so that the perm's name is set properly.
DataTreeObject_Permission
DataTreeObject_Permission
(string $name, [string $type = 'matrix'], [array $params = null])
-
string
$name: The name of the perm.
-
string
$type: The permission type.
-
array
$params: A hash with any parameters that the permission type needs.
Grants creators additional permissions to this object.
void
addCreatorPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to add.
-
boolean
$update: Whether to automatically update the backend.
Grants additional default permissions to this object.
void
addDefaultPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to add.
-
boolean
$update: Whether to automatically update the backend.
Grants a group additional permissions to this object.
void
addGroupPermission
(integer $groupId, constant $permission, [boolean $update = true])
-
integer
$groupId: The id of the group to grant additional permissions to.
-
constant
$permission: The permission (PERMS_DELETE, etc.) to add.
-
boolean
$update: Whether to automatically update the backend.
Grants guests additional permissions to this object.
void
addGuestPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to add.
-
boolean
$update: Whether to automatically update the backend.
Grants a user additional permissions to this object.
void
addUserPermission
(string $user, constant $permission, [boolean $update = true])
-
string
$user: The user to grant additional permissions to.
-
constant
$permission: The permission (PERMS_DELETE, etc.) to add.
-
boolean
$update: Whether to automatically update the backend.
Gets one of the attributes of the object, or null if it isn't defined.
mixed
get
(string $attribute)
-
string
$attribute: The attribute to get.
Redefinition of:
- DataTreeObject::get()
- Gets one of the attributes of the object, or null if it isn't defined.
Returns the creator permissions on this object.
integer
getCreatorPermissions
()
Returns the default permissions on this object.
integer
getDefaultPermissions
()
Returns an array of all group permissions on this object.
array
getGroupPermissions
([integer $perm = null])
-
integer
$perm: List only users with this permission level. Defaults to all users.
Returns the guest permissions on this object.
integer
getGuestPermissions
()
Returns an array of all user permissions on this object.
array
getUserPermissions
([integer $perm = null])
-
integer
$perm: List only users with this permission level. Defaults to all users.
Removes a permission that creators currently have on this object.
void
removeCreatorPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to remove.
-
boolean
$update: Whether to automatically update the backend.
Removes a default permission on this object.
void
removeDefaultPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to remove.
-
boolean
$update: Whether to automatically update the backend.
Removes a permission that a group currently has on this object.
void
removeGroupPermission
(integer $groupId, constant $permission, [boolean $update = true])
-
integer
$groupId: The id of the group to remove the permission from.
-
constant
$permission: The permission (PERMS_DELETE, etc.) to remove.
-
boolean
$update: Whether to automatically update the backend.
Removes a permission that guests currently have on this object.
void
removeGuestPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to remove.
-
boolean
$update: Whether to automatically update the backend.
Removes a permission that a user currently has on this object.
void
removeUserPermission
(string $user, constant $permission, [boolean $update = true])
-
string
$user: The user to remove the permission from.
-
constant
$permission: The permission (PERMS_DELETE, etc.) to remove.
-
boolean
$update: Whether to automatically update the backend.
Saves any changes to this object to the backend permanently. New objects are added instead.
boolean|PEAR_Error
save
()
Redefinition of:
- DataTreeObject::save()
- Saves any changes to this object to the backend permanently. New objects are added instead.
FIXME: needs docs
void
setPerm
( $permId, $permission, [ $update = true])
-
$permId
-
$permission
-
$update
FIXME: needs docs
void
unsetPerm
( $permId, $permission, [ $update = true])
-
$permId
-
$permission
-
$update
Updates the permissions based on data passed in the array.
void
updatePermissions
(array $perms)
-
array
$perms: An array containing the permissions which are to be updated.
Inherited Methods
Inherited From DataTreeObject
DataTreeObject::DataTreeObject()
DataTreeObject::delete()
DataTreeObject::get()
DataTreeObject::getChild()
DataTreeObject::getData()
DataTreeObject::getId()
DataTreeObject::getName()
DataTreeObject::getParent()
DataTreeObject::getShortName()
DataTreeObject::save()
DataTreeObject::set()
DataTreeObject::setData()
DataTreeObject::setDataTree()
DataTreeObject::setName()
DataTreeObject::setOrder()