Skip to content

SedMeta_IndexController

Ned Henry edited this page Jun 6, 2014 · 1 revision

SedMeta_IndexController

The Sedmeta index controller class.

  • Class name: SedMeta_IndexController
  • Namespace:
  • Parent class: Omeka_Controller_AbstractActionController

Methods

\SedMeta_IndexController::indexAction()

void SedMeta_IndexController::\SedMeta_IndexController::indexAction()()

Process form data and prepare to display the main SedMeta form.

If the form has been submitted, it performs the relevant changes. Regardless, it populates the arrays of options for the view's dropdown menus.

  • Visibility: public

\SedMeta_IndexController::itemsAction()

void SedMeta_IndexController::\SedMeta_IndexController::itemsAction()()

Retrieves selected items for preview.

Retrieves the first few items matching the selection rules and sends them to the view to be served to a browser preview script

  • Visibility: public

\SedMeta_IndexController::countitemsAction()

mixed SedMeta_IndexController::\SedMeta_IndexController::countitemsAction()()

Retrieves number of selected items for preview.

Retrieves the number of items matching the selection rules and sends them to the view to be served to a browser preview script

param void return void

  • Visibility: public

\SedMeta_IndexController::fieldsAction()

mixed SedMeta_IndexController::\SedMeta_IndexController::fieldsAction()()

Retrieves the selected metadata elements for preview.

Retrieves the number of items matching the selection rules and sends them to the view to be served to a browser preview script

param void return void

  • Visibility: public

\SedMeta_IndexController::changesAction()

mixed SedMeta_IndexController::\SedMeta_IndexController::changesAction()()

Retrieves the first few edits defined by the form input.

Retrieves the first few changes defined by the form input and sends them to the view to be served to a browser preview script

param void return void

  • Visibility: public

\SedMeta_IndexController::_perform()

mixed SedMeta_IndexController::\SedMeta_IndexController::_perform()()

Perform the edits specified by the form input.

This function calls the matching subroutines

  • * with no maximum number of results, and
    

alerts the changes subroutine to perform the changes rather than just displaying them.

  • Visibility: private

\SedMeta_IndexController::_getFormElementOptions()

array SedMeta_IndexController::\SedMeta_IndexController::_getFormElementOptions()()

Get an array to be used in formSelect() containing all elements.

  • Visibility: private

\SedMeta_IndexController::_getElementIds()

array SedMeta_IndexController::\SedMeta_IndexController::_getElementIds()()

Retrieve Element Ids.

Retrieve from the database the IDs of all elements applicable to records of type Item

  • Visibility: private

\SedMeta_IndexController::_getFormCollectionOptions()

array SedMeta_IndexController::\SedMeta_IndexController::_getFormCollectionOptions()()

Get an array to be used in formSelect() containing all collections.

  • Visibility: private

\SedMeta_IndexController::_getFormCompareOptions()

array SedMeta_IndexController::\SedMeta_IndexController::_getFormCompareOptions()()

Populate array for comparison operator dropdown

Retrieve an array to be used in formSelect() containing all comparison operators supported by this plugin.

  • Visibility: private

\SedMeta_IndexController::_getChanges()

array SedMeta_IndexController::\SedMeta_IndexController::_getChanges()(array $items, array $fields, int $max, bool $perform)

Retrieve and/or perform bulk edits.

Retrieve and optionally perform edits to metadata element texts according to the rules in the POST variables set by the input form.

  • Visibility: private

Arguments

  • $items array - <p>Array of items on which to perform the edits. Each element of this array is an array containing a single item's identifying information. Only items in this array will be selected for editing.</p>
  • $fields array - <p>Array of metadata elements on which to perform the edits. Each element of this array is an array containing a single elements's identifying information. Only elements included in this array with be selected for editing.</p>
  • $max int - <p>The maximum number of changes to return. If set to zero, all changes will be returned.</p>
  • $perform bool - <p>If true, the edits will be performed. Otherwise, the changes defined by the form input will be returned but the database will remain unchanged.</p>

\SedMeta_IndexController::_getItems()

mixed SedMeta_IndexController::\SedMeta_IndexController::_getItems()(int $max)

Retrieve Items matching selection rules.

Retrieve items matching the rules contained in the POST data from the user input form.

  • Visibility: private

Arguments

  • $max int - <p>Maximum number of items to return. If set to zero, all matching items will be returned.</p>

\SedMeta_IndexController::_pullItemData()

array SedMeta_IndexController::\SedMeta_IndexController::_pullItemData()(Object $item)

Retrieves basic data about an Omeka item

  • Visibility: private

Arguments

  • $item Object - <p>Omeka item record object to pull data from</p>

\SedMeta_IndexController::_getFields()

mixed SedMeta_IndexController::\SedMeta_IndexController::_getFields()(array $items, int $max)

Retrieve metadata elements matching selection rules.

Retrieve metadata elements from the items provided which match the rules contained in the POST data from the user input form.

  • Visibility: private

Arguments

  • $items array - <p>Array of items from whose metadata elements the fields will be selected.</p>
  • $max int - <p>Maximum number of items to return. If set to zero, all matching items will be returned.</p>