class Key extends ConcreteObject (View source)

Constants

ACCESS_TYPE_INCLUDE

ACCESS_TYPE_EXCLUDE

ACCESS_TYPE_ALL

Properties

$error from ConcreteObject
protected $permissionObject

Methods

loadError($error)

No description

isError()

No description

getError()

No description

setPropertiesFromArray($arr)

No description

static 
camelcase($file)

No description

static 
uncamelcase($string)

No description

getSupportedAccessTypes()

No description

canPermissionKeyTriggerWorkflow()

Returns whether a permission key can start a workflow.

permissionKeyHasCustomClass()

Returns whether a permission key has a custom class.

getPermissionKeyName()

Returns the name for this permission key.

string
getPermissionKeyDisplayName(string $format = 'html')

Returns the display name for this permission key (localized and escaped accordingly to $format)

getPermissionKeyHandle()

Returns the handle for this permission key.

getPermissionKeyDescription()

Returns the description for this permission key.

string
getPermissionKeyDisplayDescription(string $format = 'html')

Returns the display description for this permission key (localized and escaped accordingly to $format)

getPermissionKeyID()

Returns the ID for this permission key.

getPermissionKeyCategoryID()

No description

setPermissionObject($object)

No description

getPermissionObjectToCheck()

No description

getPermissionObject()

No description

static 
loadAll()

No description

static 
load($key, $loadBy = 'pkID')

No description

hasCustomOptionsForm()

No description

getPackageID()

No description

getPackageHandle()

No description

static 
getList($pkCategoryHandle, $filters = array())

Returns a list of all permissions of this category.

export($axml)

No description

static 
exportList($xml)

No description

static 
getListByPackage($pkg)

Note, this queries both the pkgID found on the PermissionKeys table AND any permission keys of a special type installed by that package, and any in categories by that package.

static 
import(SimpleXMLElement $pk)

No description

static 
getByID($pkID)

No description

static 
getByHandle($pkHandle)

No description

static 
add($pkCategoryHandle, $pkHandle, $pkName, $pkDescription, $pkCanTriggerWorkflow, $pkHasCustomClass, $pkg = false)

Adds an permission key.

setPermissionKeyHasCustomClass($pkHasCustomClass)

No description

can()

Legacy support.

validate()

No description

delete()

No description

getAccessListItems()

A shortcut for grabbing the current assignment and passing into that object.

getPermissionAccessObject()

No description

getPermissionAccessID()

No description

exportAccess($pxml)

No description

static 
exportTranslations()

No description

Details

loadError($error)

Parameters

$error

isError()

getError()

setPropertiesFromArray($arr)

Parameters

$arr

static camelcase($file)

Parameters

$file

static uncamelcase($string)

Parameters

$string

getSupportedAccessTypes()

canPermissionKeyTriggerWorkflow()

Returns whether a permission key can start a workflow.

permissionKeyHasCustomClass()

Returns whether a permission key has a custom class.

getPermissionKeyName()

Returns the name for this permission key.

string getPermissionKeyDisplayName(string $format = 'html')

Returns the display name for this permission key (localized and escaped accordingly to $format)

Parameters

string $format = 'html' Escape the result in html format (if $format is 'html'). If $format is 'text' or any other value, the display name won't be escaped.

Return Value

string

getPermissionKeyHandle()

Returns the handle for this permission key.

getPermissionKeyDescription()

Returns the description for this permission key.

string getPermissionKeyDisplayDescription(string $format = 'html')

Returns the display description for this permission key (localized and escaped accordingly to $format)

Parameters

string $format = 'html' Escape the result in html format (if $format is 'html'). If $format is 'text' or any other value, the display description won't be escaped.

Return Value

string

getPermissionKeyID()

Returns the ID for this permission key.

getPermissionKeyCategoryID()

getPermissionKeyCategoryHandle()

setPermissionObject($object)

Parameters

$object

getPermissionObjectToCheck()

getPermissionObject()

static loadAll()

static protected load($key, $loadBy = 'pkID')

Parameters

$key
$loadBy

hasCustomOptionsForm()

getPackageID()

getPackageHandle()

static getList($pkCategoryHandle, $filters = array())

Returns a list of all permissions of this category.

Parameters

$pkCategoryHandle
$filters

export($axml)

Parameters

$axml

static exportList($xml)

Parameters

$xml

static getListByPackage($pkg)

Note, this queries both the pkgID found on the PermissionKeys table AND any permission keys of a special type installed by that package, and any in categories by that package.

Parameters

$pkg

static import(SimpleXMLElement $pk)

Parameters

SimpleXMLElement $pk

static getByID($pkID)

Parameters

$pkID

static getByHandle($pkHandle)

Parameters

$pkHandle

static add($pkCategoryHandle, $pkHandle, $pkName, $pkDescription, $pkCanTriggerWorkflow, $pkHasCustomClass, $pkg = false)

Adds an permission key.

Parameters

$pkCategoryHandle
$pkHandle
$pkName
$pkDescription
$pkCanTriggerWorkflow
$pkHasCustomClass
$pkg

setPermissionKeyHasCustomClass($pkHasCustomClass)

Parameters

$pkHasCustomClass

can()

Legacy support.

validate()

delete()

getAccessListItems()

A shortcut for grabbing the current assignment and passing into that object.

Assignment getPermissionAssignmentObject()

Return Value

Assignment

getPermissionAccessObject()

getPermissionAccessID()

exportAccess($pxml)

Parameters

$pxml

static exportTranslations()