public function deleteSegment($id)
    {
        $em = $this->getEntityManager();
        $qb = $em->createQueryBuilder();
        $qb->select('s')
            ->from('KunstmaanDashboardBundle:AnalyticsSegment', 's')
            ->where('s.id = :id')
            ->setParameter('id', $id);

        $results = $qb->getQuery()->getResult();
        if ($results) {
            $em->remove($results[0]);
            $em->flush();
        }
    }