Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 778 Bytes

admin_items_browse_detailed_each.rst

File metadata and controls

39 lines (29 loc) · 778 Bytes

admin_items_browse_detailed_each

Usage

Append content to the details view of an item on the items browse page

Arguments

:phpItem item

The item object

:phpOmeka_View view

The view object

Examples

public function hookAdminItemsBrowseDetailedEach($args)
{
  $item = $args['item'];
  $embedTable = get_db()->getTable('Embed');
  $totalEmbeds = $embedTable->totalEmbeds($item->id);
  $html = '<p>';
  $html .= "<a href='" . url('embed-codes/item/' . $item->id) . "'>" . __('Embeds (%d)', $totalEmbeds) . "</a>";
  $html .= '</p>';
  echo $html;
}