当前位置: 首页>>代码示例>>PHP>>正文


PHP MenusHelper::getMenuTypeList方法代码示例

本文整理汇总了PHP中MenusHelper::getMenuTypeList方法的典型用法代码示例。如果您正苦于以下问题:PHP MenusHelper::getMenuTypeList方法的具体用法?PHP MenusHelper::getMenuTypeList怎么用?PHP MenusHelper::getMenuTypeList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MenusHelper的用法示例。


在下文中一共展示了MenusHelper::getMenuTypeList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: type

 function type($tpl = null)
 {
     JRequest::setVar('hidemainmenu', 1);
     global $mainframe;
     $lang =& JFactory::getLanguage();
     $this->_layout = 'type';
     $item =& $this->get('Item');
     // Set toolbar items for the page
     if (!$item->id) {
         JToolBarHelper::title(JText::_('Menu Item') . ': <small><small>[ ' . JText::_('New') . ' ]</small></small>', 'menu.png');
     } else {
         JToolBarHelper::title(JText::_('Change Menu Item'), 'menu.png');
     }
     // Set toolbar items for the page
     JToolBarHelper::cancel('view');
     JToolBarHelper::help('screen.menus.type');
     // Add scripts and stylesheets to the document
     $document =& JFactory::getDocument();
     if ($lang->isRTL()) {
         $document->addStyleSheet('components/com_menus/assets/type_rtl.css');
     } else {
         $document->addStyleSheet('components/com_menus/assets/type.css');
     }
     JHTML::_('behavior.tooltip');
     // Load component language files
     $components = MenusHelper::getComponentList();
     $n = count($components);
     for ($i = 0; $i < $n; $i++) {
         $path = JPATH_SITE . DS . 'components' . DS . $components[$i]->option . DS . 'views';
         $components[$i]->legacy = !is_dir($path);
         $lang->load($components[$i]->option, JPATH_ADMINISTRATOR);
     }
     // Initialize variables
     $item =& $this->get('Item');
     $expansion =& $this->get('Expansion');
     $component =& $this->get('Component');
     $name = $this->get('StateName');
     $description = $this->get('StateDescription');
     $menuTypes = MenusHelper::getMenuTypeList();
     // Set document title
     if ($item->id) {
         $document->setTitle(JText::_('Menu Item') . ': [' . JText::_('Edit') . ']');
     } else {
         $document->setTitle(JText::_('Menu Item') . ': [' . JText::_('New') . ']');
     }
     $this->assignRef('item', $item);
     $this->assignRef('components', $components);
     $this->assignRef('expansion', $expansion);
     parent::display($tpl);
 }
开发者ID:Fellah,项目名称:govnobaki,代码行数:50,代码来源:view.php

示例2: getPagination

 /**
  * Get a list of the menu records associated with the type
  *
  * @param string The menu type
  * @return array An array of records as objects
  */
 function getPagination()
 {
     global $mainframe;
     $menutypes = MenusHelper::getMenuTypeList();
     $total = count($menutypes);
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
     $limitstart = $mainframe->getUserStateFromRequest('com_menus.limitstart', 'limitstart', 0, 'int');
     jimport('joomla.html.pagination');
     $pagination = new JPagination($total, $limitstart, $limit);
     return $pagination;
 }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:17,代码来源:menutype.php

示例3: array

 /** 
  * 
  * get the complete list of menus in joomla 
  */
 function &getMenus()
 {
     $config =& $this->config;
     require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_menus' . DS . 'helpers' . DS . 'helper.php';
     $menutypes = MenusHelper::getMenuTypeList();
     $allmenus = array();
     $i = 0;
     foreach ($menutypes as $menu) {
         $menutype = $menu->menutype;
         $allmenus[$menutype] = new stdclass();
         $allmenus[$menutype]->ordering = $i;
         $allmenus[$menutype]->show = false;
         $allmenus[$menutype]->showSitemap = false;
         $allmenus[$menutype]->priority = '0.5';
         $allmenus[$menutype]->changefreq = 'weekly';
         $allmenus[$menutype]->id = $i;
         $allmenus[$menutype]->type = $menutype;
         $i++;
     }
     return $allmenus;
 }
开发者ID:omarmm,项目名称:MangLuoiBDS,代码行数:25,代码来源:XmapAdmin.php

示例4: ajaxShowSaveForm

 public function ajaxShowSaveForm()
 {
     CFactory::load('helpers', 'owner');
     require_once JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_menus' . DS . 'helpers' . DS . 'helper.php';
     if (!COwnerHelper::isCommunityAdmin()) {
         echo JText::_('CC RESTRICTED ACCESS');
         return;
     }
     $response = new JAXResponse();
     $args = func_get_args();
     if (!isset($args[0])) {
         $response->addScriptCall('alert', 'CC INVALID ID');
         return $resopnse->sendResponse();
     }
     $condition = $args[0];
     array_shift($args);
     $avatarOnly = $args[0];
     array_shift($args);
     $filters = $args;
     $menuTypes = MenusHelper::getMenuTypeList();
     $menuAccess = new stdClass();
     $menuAccess->access = 0;
     $tmpl = new CTemplate();
     $tmpl->set('condition', $condition);
     $tmpl->set('menuTypes', $menuTypes);
     $tmpl->set('menuAccess', $menuAccess);
     $tmpl->set('avatarOnly', $avatarOnly);
     $tmpl->set('filters', $filters);
     $html = $tmpl->fetch('ajax.memberlistform');
     $response->addAssign('cwin_logo', 'innerHTML', JText::_('CC SEARCH FILTER'));
     $response->addAssign('cWindowContent', 'innerHTML', $html);
     $action = '<button  class="button" onclick="cWindowHide();">' . JText::_('CC BUTTON CANCEL') . '</button>';
     $action .= '<button  class="button" onclick="joms.memberlist.submit();">' . JText::_('CC BUTTON SAVE') . '</button>';
     $response->addScriptCall('cWindowActions', $action);
     return $response->sendResponse();
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:36,代码来源:memberlist.php


注:本文中的MenusHelper::getMenuTypeList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。