Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManager::delete PHP Method

delete() public method

public delete ( $id )
    public function delete($id)
    {
        $collectionEntity = $this->collectionRepository->findCollectionById($id);
        if (!$collectionEntity) {
            throw new CollectionNotFoundException($id);
        }
        $this->em->remove($collectionEntity);
        $this->em->flush();
    }