public function getMenu(DTO $dto=null)
    {
        if (!$menu = $this->SystemCache->get('cms-menu')) {
            $menu = array();

            if ($dto === null)
                $dto = new DTO();

            $dto->setOrderBy('SortOrder', 'ASC');
            $dto->setParameter('FlattenChildren', false);
            $dto->setParameter('Enabled', true);

            $menu = $this->dao->findAll($dto)->getResults();

            if (count($menu) < 1)
                throw new Exception('No menu items exist on the root level.');

            $this->SystemCache->put('cms-menu', $menu, 0);
        }

        return $menu;
    }
public function getMenu(DTO $dto=null)
    {
        if (!$menu = $this->SystemCache->get('cms-menu')) {
            $menu = array();

            if ($dto === null)
                $dto = new DTO();

            $dto->setOrderBy('SortOrder', 'ASC');
            $dto->setParameter('FlattenChildren', false);
            $dto->setParameter('Enabled', true);

            $menu = $this->dao->findAll($dto)->getResults();

            if (count($menu) < 1)
                throw new Exception('No menu items exist on the root level.');

            $this->SystemCache->put('cms-menu', $menu, 0);
        }

        return $menu;
    }
public function getMenu ( DTO $ dto = null ) { if ( ! $ menu = $ this -> SystemCache -> get ( 'cms-menu' ) ) { $ menu = array ( ) ; if ( $ dto === null ) $ dto = new DTO ( ) ; $ dto -> setOrderBy ( 'SortOrder' , 'ASC' ) ; $ dto -> setParameter ( 'FlattenChildren' , false ) ; $ dto -> setParameter ( 'Enabled' , true ) ; $ menu = $ this -> dao -> findAll ( $ dto ) -> getResults ( ) ; if ( count ( $ menu ) < 1 ) throw new Exception ( 'No menu items exist on the root level.' ) ; $ this -> SystemCache -> put ( 'cms-menu' , $ menu , 0 ) ; } return $ menu ; }
Returns an array that represents the CMS Navigation menu

@param DTO $dto DTO to pass through to our DAO's findAll()

@return array An array representing the cms nav menu
Returns an array that represents the CMS Navigation menu