Table_Element

Package: Db\Table

class Table_Element

extends Omeka_Db_Table

Table_Element::findByRecordType($recordTypeName)

Find all the Element records that have a specific record type or the record type ‘All’, indicating that these elements would apply to any record type.

Parameters:
  • $recordTypeName
Returns:

array

Table_Element::getSelect()

Overriding getSelect() to always return the type_name and type_regex for retrieved elements.

Returns:Omeka_Db_Select
Table_Element::_getColumnPairs()

Return the element’s name and id for <select> tags on it.

Returns:void
Table_Element::orderElements($select)
Parameters:
  • $select
Table_Element::findBySet($elementSet)

Retrieve all elements for a set.

Parameters:
  • $elementSet
Returns:

Element

Table_Element::findByItemType($itemTypeId)

Retrieve a set of Element records that belong to a specific Item Type.

Parameters:
  • $itemTypeId
Returns:

array Set of element records.

Table_Element::findByElementSetNameAndElementName($elementSetName, $elementName)
Parameters:
  • $elementSetName
  • $elementName
Table_Element::applySearchFilters($select, $params)

Manipulate a Select object based on a set of criteria.

Parameters:
  • $select (Omeka_Db_Select) –
  • $params (array) – Possible parameters include: <ul> <li>record_types - array - Usually one or more of the following: All, Item, File</li> <li>sort - string - One of the following values: alpha</li> <li>element_set_name - string - Name of the element set to which results should belong.</li> </ul>
Table_Element::findPairsForSelectForm($options = array())

Override parent class method to retrieve a multidimensional array of elements, organized by element set, to be used in Zend’s FormSelect view helper.

Parameters:
  • $options (array) – Set of parameters for searching/filtering results.
Returns:

array