src/core/classes/org/glizycms/contents/models/proxy/MenuProxy.php
/**
     * Delete a menu
     * @param  int $menuId the menu id
     */
Delete a menu
@param  int $menuId the menu id
Delete a menu @param int $menuId the menu id
public function deleteMenu($menuId)
    {
        $menus = $this->getChildMenusFromId($menuId, org_glizy_ObjectValues::get('org.glizy', 'languageId'), false);
        foreach ($menus as $ar) {
            $this->deleteMenu($ar->menu_id);
        }
        $menu = org_glizy_ObjectFactory::createModel('org.glizycms.core.models.Menu');
        $menu->delete($menuId);
        $contentProxy = org_glizy_ObjectFactory::createObject('org.glizycms.contents.models.proxy.ContentProxy');
        $contentProxy->deleteContent($menuId);
        $this->invalidateSitemapCache();
        $evt = array('type' => org_glizycms_contents_events_Menu::DELETE, 'data' => $menuId);
        $this->dispatchEvent($evt);
    }
public function deleteMenu ( $ menuId ) { $ menus = $ this -> getChildMenusFromId ( $ menuId , org_glizy_ObjectValues :: get ( 'org.glizy' , 'languageId' ) , false ) ; foreach ( $ menus as $ ar ) { $ this -> deleteMenu ( $ ar -> menu_id ) ; } $ menu = org_glizy_ObjectFactory :: createModel ( 'org.glizycms.core.models.Menu' ) ; $ menu -> delete ( $ menuId ) ; $ contentProxy = org_glizy_ObjectFactory :: createObject ( 'org.glizycms.contents.models.proxy.ContentProxy' ) ; $ contentProxy -> deleteContent ( $ menuId ) ; $ this -> invalidateSitemapCache ( ) ; $ evt = array ( 'type' => org_glizycms_contents_events_Menu :: DELETE , 'data' => $ menuId ) ; $ this -> dispatchEvent ( $ evt ) ; }
Delete a menu
 @param  int $menuId the menu id
Delete a menu @param int $menuId the menu id
// cancella prima i nodi figli