RT 3.8.17 Documentation

RT::Attribute Overlay

Go to latest version →

NAME

  RT::Attribute_Overlay 

Content

LookupObjectRight { ObjectType => undef, ObjectId => undef, Name => undef, Right => { create, update, delete, display } }

Returns the right that the user needs to have on this attribute's object to perform the related attribute operation. Returns "allow" if the right is otherwise unspecified.

Create PARAMHASH

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

  varchar(200) 'Name'.
  varchar(255) 'Content'.
  varchar(16) 'ContentType',
  varchar(64) 'ObjectType'.
  int(11) 'ObjectId'.

You may pass a Object instead of ObjectType and ObjectId.

LoadByNameAndObject (Object => OBJECT, Name => NAME)

Loads the Attribute named NAME for Object OBJECT.

_DeserializeContent

DeserializeContent returns this Attribute's "Content" as a hashref.

Content

Returns this attribute's content. If it's a scalar, returns a scalar If it's data structure returns a ref to that data structure.

SubValue KEY

Returns the subvalue for $key.

DeleteSubValue NAME

Deletes the subvalue with the key NAME

DeleteAllSubValues

Deletes all subvalues for this attribute

SetSubValues { }

Takes a hash of keys and values and stores them in the content of this attribute.

Each key replaces the existing key with the same name

Returns a tuple of (status, message)

CurrentUserHasRight

One of "display" "update" "delete" or "create" and returns 1 if the user has that right for attributes of this name for this object.Returns undef otherwise.

TODO

We should be deserializing the content on load and then enver again, rather than at every access

← Back to index