public function remove($entity)
{
if ( ! is_object($entity)) {
throw new \InvalidArgumentException(gettype($entity));
}
$this->errorIfClosed();
$this->unitOfWork->remove($entity);
}
/** * Delete a given article * @param Article $article */ public function delete(Article $article, BusinessEntityPage $bep) { $this->entityManager->remove($bep); $this->entityManager->remove($article); //flush the modifications $this->entityManager->flush(); }