StackKey
class StackKey extends PageKey (View source)
Constants
| ACCESS_TYPE_INCLUDE | 
                     Access type: inclusive.  | 
            
| ACCESS_TYPE_EXCLUDE | 
                     Access type: exclusive.  | 
            
| ACCESS_TYPE_ALL | 
                     Access type: any.  | 
            
Properties
| $error | from ConcreteObject | ||
| protected ObjectInterface|null | $permissionObject | The object for which this permission is for (for example, a Page instance).  | 
                from Key | 
| bool|int|string | $pkID | from Key | |
| string | $pkName | from Key | |
| string | $pkHandle | from Key | |
| string | $pkDescription | from Key | |
| bool|int|string | $pkCategoryID | from Key | |
| string | $pkCategoryHandle | from Key | |
| bool|int|string|null | $pkgID | from Key | |
| bool|int|string | $pkCanTriggerWorkflow | from Key | |
| bool|int|string | $pkHasCustomClass | from Key | |
| ObjectInterface|null | $permissionObjectToCheck | from Key | |
| protected | $multiplePageArray | from PageKey | 
Methods
Get the identifiers (keys) and descriptions (values) of the access types.
Returns whether a permission key can start a workflow.
Returns the display name for this permission key (localized and escaped accordingly to $format).
Returns the display description for this permission key (localized and escaped accordingly to $format).
Returns the handle for the category of this permission key.
Set the object for which this permission is for (for example, a Page instance).
Set the actual object that should be checked for this permission (for example, a Page instance).
Get the object for which this permission is for (for example, a Page instance).
Does this permission key have a form (located at elements/permission/keys/
Get the handle of the package that defines this permission key.
Returns the list of all permissions of this category.
Export the list of all permissions of this category to a SimpleXMLElement instance.
Adds an permission key.
Mark this permission key as having (or not) a custom class.
Check if the current user is of for this key and its current permission object (if any).
A shortcut for grabbing the current assignment and passing into that object.
Details
        
                            
    loadError($error)
        
    
    No description
        
                            
    isError()
        
    
    No description
        
                            
    getError()
        
    
    No description
        
                            
    setPropertiesFromArray($arr)
        
    
    No description
        
                static            
    camelcase($file)
        
    
    No description
        
                static            
    uncamelcase($string)
        
    
    No description
        in 
Key at line 66
                            array
    getSupportedAccessTypes()
        
    
    Get the identifiers (keys) and descriptions (values) of the access types.
        in 
Key at line 81
                            bool
    canPermissionKeyTriggerWorkflow()
        
    
    Returns whether a permission key can start a workflow.
        in 
Key at line 91
                            bool
    permissionKeyHasCustomClass()
        
    
    Returns whether a permission key has a custom class.
        in 
Key at line 101
                            string
    getPermissionKeyName()
        
    
    Returns the name for this permission key.
        in 
Key at line 115
                            string
    getPermissionKeyDisplayName(string $format = 'html')
        
    
    Returns the display name for this permission key (localized and escaped accordingly to $format).
        in 
Key at line 132
                            string
    getPermissionKeyHandle()
        
    
    Returns the handle for this permission key.
        in 
Key at line 142
                            string
    getPermissionKeyDescription()
        
    
    Returns the description for this permission key.
        in 
Key at line 156
                            string
    getPermissionKeyDisplayDescription(string $format = 'html')
        
    
    Returns the display description for this permission key (localized and escaped accordingly to $format).
        in 
Key at line 173
                            int
    getPermissionKeyID()
        
    
    Returns the ID for this permission key.
        in 
Key at line 183
                            int
    getPermissionKeyCategoryID()
        
    
    Returns the ID for the category of this permission key.
        in 
Key at line 193
                            string
    getPermissionKeyCategoryHandle()
        
    
    Returns the handle for the category of this permission key.
        in 
Key at line 203
                            
    setPermissionObject(ObjectInterface|null $object)
        
    
    Set the object for which this permission is for (for example, a Page instance).
        in 
Key at line 213
                            
    getPermissionObjectToCheck()
        
    
    Set the actual object that should be checked for this permission (for example, a Page instance).
        in 
Key at line 227
                            ObjectInterface|null
    getPermissionObject()
        
    
    Get the object for which this permission is for (for example, a Page instance).
        in 
Key at line 237
                static            Key[]
    loadAll()
        
    
    Get the list of all the defined permission keys.
        in 
Key at line 276
                            bool
    hasCustomOptionsForm()
        
    
    Does this permission key have a form (located at elements/permission/keys/
        in 
Key at line 294
                            int|null
    getPackageID()
        
    
    Get the ID of the package that defines this permission key.
        in 
Key at line 304
                            string|null
    getPackageHandle()
        
    
    Get the handle of the package that defines this permission key.
        in 
Key at line 319
                static            Key[]
    getList(string $pkCategoryHandle, array $filters = [])
        
    
    Returns the list of all permissions of this category.
        in 
Key at line 346
                            SimpleXMLElement
    export(SimpleXMLElement $axml)
        
    
    Export this permission key to a SimpleXMLElement instance.
        in 
Key at line 365
                static            
    exportList(SimpleXMLElement $xml)
        
    
    Export the list of all permissions of this category to a SimpleXMLElement instance.
        in 
Key at line 386
                static            Key[]
    getListByPackage(Package|Package $pkg)
        
    
    Get the list of permission keys defined by a package.
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.
        in 
Key at line 421
                static            Key
    import(SimpleXMLElement $pk)
        
    
    Import a permission key from a SimpleXMLElement element.
        in 
Key at line 449
                static            Key|null
    getByID(int $pkID)
        
    
    Get a permission key given its ID.
        in 
Key at line 474
                static            Key|null
    getByHandle(string $pkHandle)
        
    
    Get a permission key given its handle.
        in 
Key at line 503
                static            
    add(string $pkCategoryHandle, string $pkHandle, string $pkName, string $pkDescription, bool $pkCanTriggerWorkflow, bool $pkHasCustomClass, Package|Package|null $pkg = false)
        
    
    Adds an permission key.
        in 
Key at line 529
                            
    setPermissionKeyHasCustomClass(bool $pkHasCustomClass)
        
    
    Mark this permission key as having (or not) a custom class.
        in 
Key at line 540
                            
    can()
        deprecated
    
    deprecated
No description
        in 
Key at line 550
                            bool
    validate()
        
    
    Check if the current user is of for this key and its current permission object (if any).
        in 
Key at line 583
                            
    delete()
        
    
    Delete this permission key.
        in 
Key at line 596
                            ListItem[]
    getAccessListItems()
        
    
    A shortcut for grabbing the current assignment and passing into that object.
        in 
Key at line 620
                            Assignment
    getPermissionAssignmentObject()
        
    
    No description
        in 
Key at line 639
                            Access|null
    getPermissionAccessObject()
        
    
    No description
        in 
Key at line 649
                            int|null
    getPermissionAccessID()
        
    
    No description
        in 
Key at line 659
                            
    exportAccess(SimpleXMLElement $pxml)
        
    
    No description
        in 
Key at line 669
                static            Translations
    exportTranslations()
        
    
    Export the strings that should be translated.
        in 
Key at line 694
                static    protected        Key|null
    load(int|mixed $key, string $loadBy = 'pkID')
        
    
    Load a permission key by its ID (or whatever is passed to $loadBy).
        
                            
    getMultiplePageArray()
        
    
    No description