DataItem

New in 1.34.0 (BETA)

DataItem

A DataItem represents one piece of data, similar to how an Obj represents one piece of CMS content.

Instance method summary

  • attributeDefinitions()
    Returns the schema provided via Scrivito.provideDataClass or Scrivito.provideDataItem.
  • dataClass()
    Returns the DataClass instance of the DataItem.
  • dataClassName()
    Returns the name of the DataClass of the DataItem.
  • delete()
    Deletes the DataItem by calling the delete callback of the DataClass.
  • get(attributeName)
    Returns the value of the specified DataItem attribute.
  • id()
    Returns the ID of the DataItem.
  • obj()
    Returns an Obj if the DataItem wraps a CMS Obj.
  • update(attributes)
    Updates data and of the corresponding instance of the DataItem. The attributes are provided to the corresponding update callback.