Пример #1
0
 /**
  * Delete single entity
  *
  * @param \XLite\Model\AEntity $entity Entity to detach
  *
  * @return void
  */
 protected function performDelete(\XLite\Model\AEntity $entity)
 {
     // Since Doctrine lifecycle callbacks do not allow
     // to modify associations, we've added this method
     $entity->prepareEntityBeforeCommit($entity::ACTION_DELETE);
     $this->getEntityManager()->remove($entity);
 }