Omeka_View_Helper_AllElementTexts
Package: View\Helper
- class Omeka_View_Helper_AllElementTexts
extends Zend_View_Helper_Abstract
View helper for retrieving lists of metadata for any record that uses Mixin_ElementText.
- property Omeka_View_Helper_AllElementTexts::$_record
protected Omeka_Record_AbstractRecord
The record being printed.
- property Omeka_View_Helper_AllElementTexts::$_showEmptyElements
protected bool
Flag to indicate whether to show elements that do not have text.
- property Omeka_View_Helper_AllElementTexts::$_showElementSetHeadings
protected bool
Whether to include a heading for each Element Set.
- property Omeka_View_Helper_AllElementTexts::$_emptyElementString
protected string
String to display if elements without text are shown.
- property Omeka_View_Helper_AllElementTexts::$_elementSetsToShow
protected array
Element sets to list.
- property Omeka_View_Helper_AllElementTexts::$_returnType
protected string
Type of data to return.
- property Omeka_View_Helper_AllElementTexts::$_partial
protected string
Path for the view partial.
- Omeka_View_Helper_AllElementTexts::allElementTexts($record, $options = array())
Get the record metadata list.
- Parameters:
$record (
Omeka_Record_AbstractRecord|string
) – Record to retrieve metadata from.$options (
array
) – Available options: - show_empty_elements’ => bool|string Whether to show elements that do not contain text. A string will set self::$_showEmptyElements to true and set self::$_emptyElementString to the provided string. - ‘show_element_sets’ => array List of names of element sets to display. - ‘return_type’ => string ‘array’, ‘html’. Defaults to ‘html’.- Returns:
string|array
- Omeka_View_Helper_AllElementTexts::_setOptions($options)
Set the options.
- Parameters:
$options (
array
) –
- Omeka_View_Helper_AllElementTexts::_getElementsBySet()
Get an array of all element sets containing their respective elements.
- Returns:
array
- Omeka_View_Helper_AllElementTexts::_filterItemTypeElements($elementsBySet)
Filter the display of the Item Type element set, if present.
- Parameters:
$elementsBySet (
array
) –- Returns:
array
- Omeka_View_Helper_AllElementTexts::_elementIsShowable(Element $element, $texts)
Determine if an element is allowed to be shown.
- Parameters:
$element (
Element
) –$texts (
array
) –- Returns:
bool
- Omeka_View_Helper_AllElementTexts::_getFormattedElementTexts($record, $metadata)
Return a formatted version of all the texts for the requested element.
- Parameters:
$record (
Omeka_Record_AbstractRecord
) –$metadata (
array
) –- Returns:
array
- Omeka_View_Helper_AllElementTexts::_getOutputAsHtml()
Output the default HTML format for displaying record metadata.
- Returns:
string
- Omeka_View_Helper_AllElementTexts::_getOutputAsArray()
Get the metadata list as a PHP array.
- Returns:
array
- Omeka_View_Helper_AllElementTexts::_getOutput()
Get the metadata list.
- Returns:
string|array
- Omeka_View_Helper_AllElementTexts::_loadViewPartial($vars = array())
Load a view partial to display the data.
- Parameters:
$vars (
array
) – Variables to pass to the partial.- Returns:
string