plugin/exo/Manager/Item/ItemManager.php
public function delete(Item $item, $user, $skipErrors = false)
    {
        if (!$this->canEdit($item, $user)) {
            if (!$skipErrors) {
                throw new \Exception('You can not delete this item.');
            } else {
                return;
            }
        }

        $this->om->remove($item);
        $this->om->flush();
    }
public function delete(Item $item, $user, $skipErrors = false)
    {
        if (!$this->canEdit($item, $user)) {
            if (!$skipErrors) {
                throw new \Exception('You can not delete this item.');
            } else {
                return;
            }
        }

        $this->om->remove($item);
        $this->om->flush();
    }
public function delete ( Item $ item , $ user , $ skipErrors = false ) { if ( ! $ this -> canEdit ( $ item , $ user ) ) { if ( ! $ skipErrors ) { throw new \ Exception ( 'You can not delete this item.' ) ; } else { return ; } } $ this -> om -> remove ( $ item ) ; $ this -> om -> flush ( ) ; }
Deletes an Item.
It's only possible if the Item is not used in an Exercise.

@param Item $item
@param $user
@param bool $skipErrors

@throws \Exception
Deletes an Item . It s only possible if the Item is not used in an Exercise .