RT 5.0.7 Documentation

RT::Class

METHODS

Load IDENTIFIER

Loads a class, either by name or by id

Create PARAMHASH

Create takes a hash of values and creates a row in the database:

  varchar(255) 'Name'.
  varchar(255) 'Description'.
  int(11) 'SortOrder'.

AppliedTo

Returns collection of Queues this Class is applied to. Doesn't takes into account if object is applied globally.

NotAppliedTo

Returns collection of Queues this Class is not applied to.

Doesn't takes into account if object is applied globally.

IsApplied

Takes object id and returns corresponding RT::ObjectClass record if this Class is applied to the object. Use 0 to check if Class is applied globally.

AddToObject OBJECT

Apply this Class to a single object, to start with we support Queues

Takes an object

RemoveFromObject OBJECT

Remove this class from a single queue object

IncludeName

Returns 1 if the class is configured for the article Name to be included with article content, 0 otherwise.

IncludeSummary

Returns 1 if the class is configured for the article Summary to be included with article content, 0 otherwise.

EscapeHTML

Returns 1 if the content of custom fields should be filtered through EscapeHTML, 0 otherwise.

IncludedArticleCustomFields

As ArticleCustomFields, but filtered to only include those that should have either their Title (Name) or Value included in content.

IncludeArticleCFTitle CustomFieldObject

Returns true if the title of the custom field should be included in article content, and false otherwise.

IncludeArticleCFValue CustomFieldObject

Returns true if the value of the custom field should be included in article content, and false otherwise.

CurrentUserCanSee

Returns true if the current user can see the class, using SeeClass.

CurrentUserCanCreate

Returns true if the current user can create a new class, using AdminClass.

CurrentUserCanModify

Returns true if the current user can modify the class, using AdminClass.

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(255).)

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(255).)

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).)

SortOrder

Returns the current value of SortOrder. (In the database, SortOrder is stored as int(11).)

SetSortOrder VALUE

Set SortOrder to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, SortOrder will be stored as a int(11).)

Disabled

Returns the current value of Disabled. (In the database, Disabled is stored as int(2).)

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 int(2).)

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.)

← Back to index