Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
ENH: refs #265. Add item delete callback (for the slicer plugin to use)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachmullen committed Nov 10, 2011
1 parent a13e277 commit 98e7119
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/models/base/ItemModelBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ abstract function getByUuid($uuid);
abstract function getAll();
abstract function getItemsFromSearch($searchterm, $userDao, $limit = 14, $group = true, $order = 'view');

/** delete an item */
public function delete($dao)
{
if(!$dao instanceof ItemDao)
{
throw new Zend_Exception('You must pass an item dao to ItemModel::delete');
}
Zend_Registry::get('notifier')->callback('CALLBACK_CORE_ITEM_DELETED', array('item' => $dao));
parent::delete($dao);
}// delete

/** save */
public function save($dao)
{
Expand Down

0 comments on commit 98e7119

Please sign in to comment.