Ejemplo n.º 1
0
 /**
  * @param string      $itemId
  * @param string|null $collection
  */
 public function delete($itemId, $collection = null)
 {
     $item = $this->_itemManager->get($itemId, $collection);
     if ($item) {
         $this->_itemManager->delete($item, $collection);
         $this->_recommender->onDelete($item);
     }
 }
Ejemplo n.º 2
0
 /**
  * @param Item $item
  */
 public function onDelete(Item $item)
 {
     $this->im->getRepository()->removeAllSimilarReferencesForItem($item);
     $this->dm->clear();
 }