RT 5.0.4 Documentation
RT::CustomRole
- NAME
- DESCRIPTION
- METHODS
- Table
- Create PARAMHASH
- Load ID/NAME
- ValidateName NAME
- ValidateLookupType TYPE
- Delete
- IsAdded
- IsAddedToAny
- AddedTo
- NotAddedTo
- AddToObject
- RemoveFromObject
- SingleValue
- UnlimitedValues
- GroupType
- id
- Name
- SetName VALUE
- Description
- SetDescription VALUE
- MaxValues
- SetMaxValues VALUE
- LookupType
- SetLookupType VALUE
- EntryHint
- SetEntryHint VALUE
- Creator
- Created
- LastUpdatedBy
- LastUpdated
- Disabled
- SetDisabled VALUE
NAME
RT::CustomRole - user-defined role groups
DESCRIPTION
METHODS
Table
Returns table name for records of this class
Create PARAMHASH
Create takes a hash of values and creates a row in the database:
varchar(200) 'Name'.
varchar(255) 'Description'.
int(11) 'MaxValues'.
varchar(255) 'EntryHint'.
varchar(255) 'LookupType'.
smallint(6) 'Disabled'.
Load ID/NAME
Load a custom role. If the value handed in is an integer, load by ID. Otherwise, load by name.
ValidateName NAME
Takes a custom role name. Returns true if it's an ok name for a new custom role. Returns undef if there's already a role by that name.
ValidateLookupType TYPE
Takes a custom role lookup type. Returns true unless there's another role with the same name and lookup type.
Delete
Delete this object. You should Disable instead.
IsAdded
Takes an object id and returns a boolean indicating whether the custom role applies to that object
IsAddedToAny
Returns a boolean of whether this custom role has been applied to any objects
AddedTo
Returns a collection of objects this custom role is applied to
NotAddedTo
Returns a collection of objects this custom role is not applied to
AddToObject
Adds (applies) this custom role to the provided object (ObjectId).
Accepts a param hash of:
ObjectId
-
Object id of the class corresponding with "LookupType".
SortOrder
-
Number indicating the relative order of the custom role
Returns (val, message). If val is false, the message contains an error message.
RemoveFromObject
Removes this custom role from the provided object (ObjectId).
Accepts a param hash of:
ObjectId
-
Object id of the class corresponding with "LookupType".
Returns (val, message). If val is false, the message contains an error message.
SingleValue
Returns true if this custom role accepts only a single member. Returns false if it accepts multiple members.
UnlimitedValues
Returns true if this custom role accepts multiple members. Returns false if it accepts only a single member.
GroupType
The Name
that groups for this custom role will have.
id
Returns the current value of id. (In the database, id is stored as int(11).)
Name
Returns the current value of Name. (In the database, Name is stored as varchar(200).)
SetName VALUE
Set Name to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, Name will be stored as a varchar(200).)
Description
Returns the current value of Description. (In the database, Description is stored as varchar(255).)
SetDescription VALUE
Set Description to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, Description will be stored as a varchar(255).)
MaxValues
Returns the current value of MaxValues. (In the database, MaxValues is stored as int(11).)
SetMaxValues VALUE
Set MaxValues to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, MaxValues will be stored as a int(11).)
LookupType
Returns the current value of LookupType. (In the database, LookupType is stored as varchar(255).)
SetLookupType VALUE
Set LookupType to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, LookupType will be stored as a varchar(255).)
EntryHint
Returns the current value of EntryHint. (In the database, EntryHint is stored as varchar(255).)
SetEntryHint VALUE
Set EntryHint to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, EntryHint will be stored as a varchar(255).)
Creator
Returns the current value of Creator. (In the database, Creator is stored as int(11).)
Created
Returns the current value of Created. (In the database, Created is stored as datetime.)
LastUpdatedBy
Returns the current value of LastUpdatedBy. (In the database, LastUpdatedBy is stored as int(11).)
LastUpdated
Returns the current value of LastUpdated. (In the database, LastUpdated is stored as datetime.)
Disabled
Returns the current value of Disabled. (In the database, Disabled is stored as smallint(6).)
SetDisabled VALUE
Set Disabled to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, Disabled will be stored as a smallint(6).)
← Back to index