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


PHP gpOutput::GetgpOutInfo方法代码示例

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


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

示例1: GetMenus

 function GetMenus()
 {
     global $page, $GP_MENU_LINKS, $GP_MENU_CLASS;
     foreach ($_REQUEST['menus'] as $id => $menu) {
         $info = gpOutput::GetgpOutInfo($menu);
         if (!isset($info['method'])) {
             continue;
         }
         $array = array();
         $array[0] = 'replacemenu';
         $array[1] = '#' . $id;
         if (!empty($_REQUEST['menuh'][$id])) {
             $GP_MENU_LINKS = rawurldecode($_REQUEST['menuh'][$id]);
         }
         if (!empty($_REQUEST['menuc'][$id])) {
             $GP_MENU_CLASS = rawurldecode($_REQUEST['menuc'][$id]);
         }
         ob_start();
         call_user_func($info['method'], $info['arg'], $info);
         $array[2] = ob_get_clean();
         $page->ajaxReplace[] = $array;
     }
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:23,代码来源:admin_menu_new.php

示例2: AddContent

 /**
  * Insert new content into a layout
  *
  */
 function AddContent()
 {
     global $langmessage, $page;
     //for ajax responses
     $page->ajaxReplace = array();
     if (!isset($_REQUEST['where'])) {
         message($langmessage['OOPS']);
         return false;
     }
     //prep destination
     if (!$this->GetValues($_REQUEST['where'], $to_container, $to_gpOutCmd)) {
         message($langmessage['OOPS'] . ' (Insert location not found)');
         return false;
     }
     $handlers = $this->GetAllHandlers();
     $this->PrepContainerHandlers($handlers, $to_container, $to_gpOutCmd);
     //figure out what we're inserting
     $addtype =& $_REQUEST['addtype'];
     switch ($_REQUEST['addtype']) {
         case 'new_extra':
             $extra_name = $this->NewExtraArea();
             if ($extra_name === false) {
                 message($langmessage['OOPS'] . '(2)');
                 return false;
             }
             $insert = 'Extra:' . $extra_name;
             break;
         case 'custom_menu':
             $insert = $this->NewCustomMenu();
             break;
         case 'preset_menu':
             $insert = $this->NewPresetMenu();
             break;
         default:
             $insert = $_REQUEST['insert'];
             break;
     }
     if (!$insert) {
         message($langmessage['OOPS'] . ' (Nothing to insert)');
         return false;
     }
     //new info
     $new_gpOutInfo = gpOutput::GetgpOutInfo($insert);
     if (!$new_gpOutInfo) {
         message($langmessage['OOPS'] . ' (Nothing to insert)');
         return false;
     }
     $new_gpOutCmd = rtrim($new_gpOutInfo['key'] . ':' . $new_gpOutInfo['arg'], ':');
     if (!$this->AddToContainer($handlers[$to_container], $to_gpOutCmd, $new_gpOutCmd, false)) {
         return false;
     }
     $this->SaveHandlersNew($handlers);
     return true;
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:58,代码来源:admin_theme_content.php

示例3: WhichGadgets

 /**
  * Return information about the gadgets being used in the current layout
  * @return array
  */
 static function WhichGadgets($layout)
 {
     global $config, $gpLayouts;
     $gadget_info = $temp_info = array();
     if (!isset($config['gadgets'])) {
         return $gadget_info;
     }
     $layout_info =& $gpLayouts[$layout];
     $GetAllGadgets = true;
     if (isset($layout_info['all_gadgets']) && !$layout_info['all_gadgets']) {
         $GetAllGadgets = false;
     }
     if (isset($layout_info['handlers'])) {
         foreach ($layout_info['handlers'] as $handler => $out_cmds) {
             //don't prep even if GetAllGadgets is set in the layout's config
             if ($handler == 'GetAllGadgets' && !$GetAllGadgets) {
                 continue;
             }
             foreach ($out_cmds as $gpOutCmd) {
                 $temp_info[$gpOutCmd] = gpOutput::GetgpOutInfo($gpOutCmd);
             }
         }
     }
     //add all gadgets if $GetAllGadgets is true and the GetAllGadgets handler isn't overwritten
     if ($GetAllGadgets && !isset($layout_info['handlers']['GetAllGadgets'])) {
         foreach ($config['gadgets'] as $gadget => $temp) {
             if (isset($temp['addon'])) {
                 $temp_info[$gadget] = gpOutput::GetgpOutInfo($gadget);
             }
         }
     }
     foreach ($temp_info as $gpOutCmd => $info) {
         if (isset($info['is_gadget']) && $info['is_gadget'] && !isset($info['disabled'])) {
             $gadget_info[$gpOutCmd] = $info;
         }
     }
     return $gadget_info;
 }
开发者ID:Bomberus,项目名称:gpEasy-CMS,代码行数:42,代码来源:gpOutput.php


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