-
Notifications
You must be signed in to change notification settings - Fork 4
HistoryLogPlugin
History Log plugin class
- Class name: HistoryLogPlugin
- Namespace:
- Parent class: Omeka_Plugin_AbstractPlugin
protected array $_hooks = array('install', 'uninstall', 'after_save_item', 'before_save_item', 'define_acl', 'before_delete_item', 'admin_items_show', 'initialize', 'admin_head')
- Visibility: protected
protected array $_filters = array('admin_navigation_main')
- Visibility: protected
void HistoryLogPlugin::\HistoryLogPlugin::hookDefineAcl()(array $args)
Define the plugin's access control list.
- Visibility: public
- $args array - <p>Parameters supplied by the hook</p>
void HistoryLogPlugin::\HistoryLogPlugin::hookInitialize()()
Load the helper class when the plugin loads
- Visibility: public
void HistoryLogPlugin::\HistoryLogPlugin::hookAdminHead()()
Load the plugin javascript when admin section loads
- Visibility: public
array HistoryLogPlugin::\HistoryLogPlugin::filterAdminNavigationMain()(array $nav)
Add the History Log link to the admin main navigation.
- Visibility: public
- $nav array - <p>Navigation array.</p>
void HistoryLogPlugin::\HistoryLogPlugin::hookInstall()()
When the plugin installs, create the database tables to store the logs
- Visibility: public
void HistoryLogPlugin::\HistoryLogPlugin::hookUninstall()()
When the plugin uninstalls, delete the database tables which store the logs
- Visibility: public
void HistoryLogPlugin::\HistoryLogPlugin::hookBeforeSaveItem()(array $args)
When an item is saved, determine whether it is a new item or an item update. If it is an update, log the event.
Otherwise, wait until after the save.
- Visibility: public
- $args array - <p>An array of parameters passed by the hook</p>
void HistoryLogPlugin::\HistoryLogPlugin::hookAfterSaveItem()(array $args)
When an item is saved, determine whether it is a new item or an item update. If it is a new item, log the event.
- Visibility: public
- $args array - <p>An array of parameters passed by the hook</p>
void HistoryLogPlugin::\HistoryLogPlugin::hookBeforeDeleteItem()(array $args)
When an item is deleted, log the event.
- Visibility: public
- $args array - <p>An array of parameters passed by the hook</p>
void HistoryLogPlugin::\HistoryLogPlugin::hookAdminItemsShow()(array $args)
Show the 5 most recent events in the item's history on the item's admin page
- Visibility: public
- $args array - <p>An array of parameters passed by the hook</p>
void HistoryLogPlugin::\HistoryLogPlugin::_logItem()(Object $item, string $type, string $value)
Create a new log entry
- Visibility: private
- $item Object - <p>The Omeka item to log</p>
- $type string - <p>The type of event to log (e.g. "create", "update")</p>
- $value string - <p>An extra piece of type specific data for the log</p>
array HistoryLogPlugin::\HistoryLogPlugin::_findChanges()(Object $item)
If an item is being updated, find out which elements are being altered
- Visibility: private
- $item Object - <p>The updated omeka item record</p>
string HistoryLogPlugin::\HistoryLogPlugin::_getTitle()(int $itemID)
Retrieves the title of an item by itemID
- Visibility: private
- $itemID int - <p>The id of the item to log</p>