RT::CustomRole - user-defined role groups
Returns table name for records of this class
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 a custom role. If the value handed in is an integer, load by ID. Otherwise, load by 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.
Takes a custom role lookup type. Returns true unless there's another role with the same name and lookup type.
Delete this object. You should Disable instead.
Takes an object id and returns a boolean indicating whether the custom role applies to that object
Returns a boolean of whether this custom role has been applied to any objects
Returns a collection of objects this custom role is applied to
Returns a collection of objects this custom role is not applied to
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.
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.
Returns true if this custom role accepts only a single member. Returns false if it accepts multiple members.
Returns true if this custom role accepts multiple members. Returns false if it accepts only a single member.
The Name
that groups for this custom role will have.
Returns the current value of id. (In the database, id is stored as int(11).)
Returns the current value of Name. (In the database, Name is stored as varchar(200).)
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).)
Returns the current value of Description. (In the database, Description is stored as varchar(255).)
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).)
Returns the current value of MaxValues. (In the database, MaxValues is stored as int(11).)
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).)
Returns the current value of LookupType. (In the database, LookupType is stored as varchar(255).)
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).)
Returns the current value of EntryHint. (In the database, EntryHint is stored as varchar(255).)
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).)
Returns the current value of Creator. (In the database, Creator is stored as int(11).)
Returns the current value of Created. (In the database, Created is stored as datetime.)
Returns the current value of LastUpdatedBy. (In the database, LastUpdatedBy is stored as int(11).)
Returns the current value of LastUpdated. (In the database, LastUpdated is stored as datetime.)
Returns the current value of Disabled. (In the database, Disabled is stored as smallint(6).)
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