ElementSet

Package: Record

class ElementSet

extends Omeka_Record_AbstractRecord

implements Zend_Acl_Resource_Interface

An element set and its metadata.

constant ElementSet::ITEM_TYPE_NAME

The name of the item type element set.

This is used wherever it is important to distinguish this special case element set from others.

property ElementSet::$record_type

string

Type of record this set applies to.

property ElementSet::$name

string

Name for the element set.

property ElementSet::$description

string

Description for the element set.

property ElementSet::$_elementsToSave

protected array

Child Element records to save when saving this set.

ElementSet::getElements()

Get the Elements that are in this set.

Returns:array
ElementSet::addElements($elements)

Add elements to the element set.

Parameters:
  • $elements (array) –
ElementSet::_buildElementRecord($options)

Create a new Element record with the given data.

Parameters:
  • $options (array) – Data to set on the Element.
Returns:

Element

ElementSet::afterSave($args)

After-save hook.

Save the $_elementsToSave and set their orders.

Parameters:
  • $args
ElementSet::_delete()

Delete all the elements associated with an element set.

Returns:void
ElementSet::_getNextElementOrder()

Get an order value to place an Element at the end of this set.

Returns:int
ElementSet::_validate()

Validate the element set.

Tests that name is non-empty and unique.

ElementSet::getResourceId()

Identify ElementSet records as relating to the ElementSets ACL resource.

Required by Zend_Acl_Resource_Interface.

Returns:string