<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Core_Widget_MenuGenericController extends Engine_Content_Widget_Abstract
{
  public function indexAction()
  {
    $name = $this->_getParam('menu');
    if( !$name ) {
      return $this->setNoRender();
    }

    $this->view->navigation = $navigation = Engine_Api::_()
      ->getApi('menus', 'core')
      ->getNavigation($name);

    if( engine_count($navigation) <= 0 ) {
      return $this->setNoRender();
    }
    
    $this->view->ulClass = $this->_getParam('ulClass', null);
  }
}
