public function upMenuPagesPosition($menuName, $position, $positionLimit = NULL)
    {
        if (is_null($positionLimit))
        {
            $query = $this->getEntityManager()->createQuery('UPDATE FulgurioLightCMSBundle:PageMenu m SET m.position=m.position-1 WHERE m.position>=:position AND m.label=:menuName');
        }
        else
        {
            $query = $this->getEntityManager()->createQuery('UPDATE FulgurioLightCMSBundle:PageMenu m SET m.position=m.position-1 WHERE m.position>=:position AND m.position<=:positionLimit AND m.label=:menuName');
            $query->setParameter('positionLimit', $positionLimit);
        }
        $query->setParameter('menuName', $menuName);
        $query->setParameter('position', $position);
        $query->getResult();
    }
public function upMenuPagesPosition($menuName, $position, $positionLimit = NULL)
    {
        if (is_null($positionLimit))
        {
            $query = $this->getEntityManager()->createQuery('UPDATE FulgurioLightCMSBundle:PageMenu m SET m.position=m.position-1 WHERE m.position>=:position AND m.label=:menuName');
        }
        else
        {
            $query = $this->getEntityManager()->createQuery('UPDATE FulgurioLightCMSBundle:PageMenu m SET m.position=m.position-1 WHERE m.position>=:position AND m.position<=:positionLimit AND m.label=:menuName');
            $query->setParameter('positionLimit', $positionLimit);
        }
        $query->setParameter('menuName', $menuName);
        $query->setParameter('position', $position);
        $query->getResult();
    }
public function upMenuPagesPosition ( $ menuName , $ position , $ positionLimit = NULL ) { if ( is_null ( $ positionLimit ) ) { $ query = $ this -> getEntityManager ( ) -> createQuery ( 'UPDATE FulgurioLightCMSBundle:PageMenu m SET m.position=m.position-1 WHERE m.position>=:position AND m.label=:menuName' ) ; } else { $ query = $ this -> getEntityManager ( ) -> createQuery ( 'UPDATE FulgurioLightCMSBundle:PageMenu m SET m.position=m.position-1 WHERE m.position>=:position AND m.position<=:positionLimit AND m.label=:menuName' ) ; $ query -> setParameter ( 'positionLimit' , $ positionLimit ) ; } $ query -> setParameter ( 'menuName' , $ menuName ) ; $ query -> setParameter ( 'position' , $ position ) ; $ query -> getResult ( ) ; }
Up pages menu position

@param string $menuName
@param number $position
@param number $positionLimit
Up pages menu position