Newscoop\Entity\Repository\ArticleDatetimeRepository::deleteById PHP Method

deleteById() public method

public deleteById ( $id )
    public function deleteById($id)
    {
        $em = $this->getEntityManager();
        if (is_numeric($id)) {
            //$entry = $this->findBy(array('id' => $id));
            $entry = $this->find($id);
            $em->remove($entry);
            $em->flush();
        }
    }