Obj

The base class for CMS objects.

A CMS object is a collection of attributes and their values, as defined by its object class. For custom attributes, various attribute types are available.

System attributes

Obj provides the following system attributes to all CMS objects:

Attribute nameGetterPurposeRead only
idid()Unique identifier of a CMS object
_lastChangedlastChanged()Date of most recent change made to the object
_objClassobjClass()CMS object model class, e.g. ”NewsPage”
_pathpath()Path in the object hierarchy, e.g. ”/about/staff” (optional)
_permalinkpermalink()Unique permanent URL component of the object, e.g. ”news” (optional)

Static method summary

Instance method summary

  • Returns an array of all the ancestor Objs, starting at the root and ending at the parent of this Obj.

  • Returns a list of all Objs that link to this Obj.

  • Returns an array of all child Objs of the CMS object.

  • The content length (byte size) of a binary CMS object.

  • The content type of a binary CMS object.

  • The URL of a binary CMS object.

  • Destroys the CMS object in the current working copy.

  • Retrieves the value of the specified custom attribute of the Obj.

  • The unique identifier of the Obj.

  • Indicates whether the Obj represents binary data.

  • New in 1.7.0

    Indicates whether or not the Obj is publicly accessible, i.e. visible to anonymous visitors.

  • The date the CMS object was last changed.

  • The metadata of a binary CMS object.

  • The object class name of the Obj.

  • Returns the Obj representing the path-based parent of the Obj.

  • The value of the _path attribute of the CMS object.

  • The value of the _permalink attribute of the CMS object.

  • New in 1.7.0

    Restricts the visibility of the Obj to logged-in visitors.

  • The slug of the CMS object.

  • New in 1.7.0

    Unrestricts the visibility of the Obj, i.e. makes it visible to any visitor (after publishing).

  • Updates one or more attributes of the Obj.

  • Accesses a widget by its id.

  • Returns all widgets of the CMS object.