public function getLastMenuPosition($menuName)
    {
        $query = $this->getEntityManager()->createQuery('SELECT MAX(m.position) FROM FulgurioLightCMSBundle:PageMenu m WHERE m.label=:menuName');
        $query->setParameter('menuName', $menuName);
        return $query->getSingleScalarResult();
    }
public function getLastMenuPosition($menuName)
    {
        $query = $this->getEntityManager()->createQuery('SELECT MAX(m.position) FROM FulgurioLightCMSBundle:PageMenu m WHERE m.label=:menuName');
        $query->setParameter('menuName', $menuName);
        return $query->getSingleScalarResult();
    }
public function getLastMenuPosition ( $ menuName ) { $ query = $ this -> getEntityManager ( ) -> createQuery ( 'SELECT MAX(m.position) FROM FulgurioLightCMSBundle:PageMenu m WHERE m.label=:menuName' ) ; $ query -> setParameter ( 'menuName' , $ menuName ) ; return $ query -> getSingleScalarResult ( ) ; }
Get last position in menu

@param string $menuName
@return number
Get last position in menu