vBulletin v6.0.4

vB_ChannelPermission
in package
Uses vB_Trait_NoSerialize

Channel Permissions interface Provides methods used in admincp to read and set channel- specific permissions.

Table of Contents

Constants

TYPE_BITMAP  = 1
TYPE_BOOL  = 4
TYPE_COUNT  = 3
TYPE_HOURS  = 2

Methods

__serialize()  : array<string|int, mixed>
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
buildDefaultChannelPermsDatastore()  : mixed
compareDefaultChannelPermissions()  : bool
Compare current channel permissions with default ones.
deletePerms()  : mixed
this deletes an existing permission
fetchPermById()  : array<string|int, mixed>
this returns a permission setting by permissionid
fetchPermFields()  : mixed
this returns the fields and types.
fetchPermissions()  : mixed
this returns a specific permission setting
fetchPermPhrases()  : mixed
this returns the fields and types.
fetchPermSettings()  : mixed
this returns the basic settings array.
instance()  : vB_ChannelPermission
Returns singleton instance of self.
loadDefaultChannelPermissions()  : array<string|int, mixed>
Load default channel permissions
setPermissions()  : mixed
this sets permissions for a node and group.

Constants

Methods

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__sleep()

public __sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

public __unserialize(array<string|int, mixed> $serialized) : void
Parameters
$serialized : array<string|int, mixed>

buildDefaultChannelPermsDatastore()

public buildDefaultChannelPermsDatastore() : mixed

compareDefaultChannelPermissions()

Compare current channel permissions with default ones.

public static compareDefaultChannelPermissions( $nodeid,  $groupid[, array<string|int, mixed> $currentpermissioncache = [] ]) : bool
Parameters
$nodeid :

int Node ID

$groupid :

int Group ID

$currentpermissioncache : array<string|int, mixed> = []

If set the function won't try to load

Return values
bool

If current permissions are modified, return true. Otherwise false.

deletePerms()

this deletes an existing permission

public deletePerms(mixed $params) : mixed
@return	mixed		either permissionid(single or array), or nodeid and usergroupid.

A single Nodeid is required and usergroup is optional and may be an array

Parameters
$params : mixed

fetchPermById()

this returns a permission setting by permissionid

public fetchPermById(mixed $permissionid) : array<string|int, mixed>
@param	integer		the permissionid
Parameters
$permissionid : mixed
Return values
array<string|int, mixed>

of $groupid => [permission fields]. Empty array if no permissions set for that node.

fetchPermFields()

this returns the fields and types.

public static fetchPermFields() : mixed
@return	mixed		the $permissionFields array

fetchPermissions()

this returns a specific permission setting

public fetchPermissions(mixed $nodeid[, mixed $groupid = false ]) : mixed
@param	integer		the node for which we are checking permissions
Parameters
$nodeid : mixed
$groupid : mixed = false

fetchPermPhrases()

this returns the fields and types.

public static fetchPermPhrases() : mixed
@return	mixed		the $permissionFields array

fetchPermSettings()

this returns the basic settings array.

public fetchPermSettings() : mixed
@return	mixed		the permSettings array

loadDefaultChannelPermissions()

Load default channel permissions

public static loadDefaultChannelPermissions([ $nodeid = 0 ][,  $groupid = 0 ]) : array<string|int, mixed>
Parameters
$nodeid : = 0

int Node ID

$groupid : = 0

int Group ID

Return values
array<string|int, mixed>

Channel permissions

setPermissions()

this sets permissions for a node and group.

public setPermissions(mixed $nodeid, mixed $groupid, mixed $permissions[, mixed $updatedefault = false ]) : mixed
@param	integer		the node for which we are setting permissions
Parameters
$nodeid : mixed
$groupid : mixed
$permissions : mixed
$updatedefault : mixed = false

        
On this page

Search results