當前位置: 首頁>>代碼示例>>PHP>>正文


PHP admin_tools::GetAddonLinks方法代碼示例

本文整理匯總了PHP中admin_tools::GetAddonLinks方法的典型用法代碼示例。如果您正苦於以下問題:PHP admin_tools::GetAddonLinks方法的具體用法?PHP admin_tools::GetAddonLinks怎麽用?PHP admin_tools::GetAddonLinks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在admin_tools的用法示例。


在下文中一共展示了admin_tools::GetAddonLinks方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: AdminPanelLinks

 /**
  * Output the link areas that are displayed in the main admin toolbar and admin_main
  * @param bool $in_panel Whether or not the links will be displayed in the toolbar
  * @static
  */
 static function AdminPanelLinks($in_panel = true)
 {
     global $langmessage, $page, $gpAdmin;
     $expand_class = 'expand_child';
     $id_piece = '';
     if (!$in_panel) {
         $expand_class = 'expand_child_click';
         $id_piece = '_click';
     }
     //current page
     if ($in_panel && !isset($GLOBALS['GP_ARRANGE_CONTENT']) && $page->pagetype != 'admin_display') {
         echo '<div class="panelgroup" id="current_page_panel">';
         self::PanelHeading($in_panel, $langmessage['Current Page'], 'icon_page_gear', 'cur');
         echo '<ul class="submenu">';
         echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Current Page'] . '</a></li>';
         foreach ($page->admin_links as $label => $link) {
             echo '<li>';
             if (is_array($link)) {
                 echo call_user_func_array(array('common', 'Link'), $link);
                 /* preferred */
             } elseif (is_numeric($label)) {
                 echo $link;
                 //just a text label
             } elseif (empty($link)) {
                 echo '<span>';
                 echo $label;
                 echo '</span>';
             } else {
                 echo '<a href="' . $link . '">';
                 echo $label;
                 echo '</a>';
             }
             echo '</li>';
         }
         echo '<li class="' . $expand_class . '" id="editable_areas_list"><a>' . $langmessage['Editable Areas'] . '</a>';
         echo '<ul class="in_window">';
         if ($page->pagetype == 'display') {
             echo '<li class="separator">';
             echo common::Link($page->title, $langmessage['Manage Sections'] . '...', 'cmd=ManageSections', array('data-cmd' => 'inline_edit_generic', 'data-arg' => 'manage_sections'));
             echo '</li>';
         }
         echo '<li style="display:none"></li>';
         //for valid html
         echo '</ul>';
         echo '</li>';
         echo '</ul>';
         echo '</div>';
         echo '</div>';
     }
     //content
     if ($links = admin_tools::GetAdminGroup('content')) {
         echo '<div class="panelgroup" id="panelgroup_content' . $id_piece . '">';
         self::PanelHeading($in_panel, $langmessage['Content'], 'icon_page', 'con');
         echo '<ul class="submenu">';
         echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Content'] . '</a></li>';
         echo $links;
         echo '</ul>';
         echo '</div>';
         echo '</div>';
     }
     //appearance
     if ($links = self::GetAppearanceGroup($in_panel)) {
         echo '<div class="panelgroup" id="panelgroup_appearance' . $id_piece . '">';
         self::PanelHeading($in_panel, $langmessage['Appearance'], 'icon_app', 'app');
         echo '<ul class="submenu">';
         echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Appearance'] . '</a></li>';
         echo $links;
         echo '</ul>';
         echo '</div>';
         echo '</div>';
     }
     //add-ons
     $links = admin_tools::GetAddonLinks($in_panel);
     if (!empty($links)) {
         echo '<div class="panelgroup" id="panelgroup_addons' . $id_piece . '">';
         self::PanelHeading($in_panel, $langmessage['plugins'], 'icon_plug', 'add');
         echo '<ul class="submenu">';
         echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['plugins'] . '</a></li>';
         echo $links;
         echo '</ul>';
         echo '</div>';
         echo '</div>';
     }
     //settings
     if ($links = admin_tools::GetAdminGroup('settings')) {
         echo '<div class="panelgroup" id="panelgroup_settings' . $id_piece . '">';
         self::PanelHeading($in_panel, $langmessage['Settings'], 'icon_edapp', 'set');
         echo '<ul class="submenu">';
         echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Settings'] . '</a></li>';
         echo $links;
         echo '</ul>';
         echo '</div>';
         echo '</div>';
     }
     //updates
//.........這裏部分代碼省略.........
開發者ID:Bomberus,項目名稱:gpEasy-CMS,代碼行數:101,代碼來源:admin_tools.php

示例2: AdminPanelLinks


//.........這裏部分代碼省略.........
         }
         echo '<ul class="submenu">';
         echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Content'] . '</a></li>';
         echo $links;
         echo '</ul>';
         echo '</div>';
         echo '</div>';
     }
     //appearance
     if ($links = admin_tools::GetAdminGroup('appearance')) {
         echo '<div class="panelgroup">';
         $label = '<span>' . $langmessage['Appearance'] . '</span>';
         if (!$in_panel) {
             echo '<span class="icon_app">' . $label . '</span>';
             echo '<div class="panelgroup2">';
         } else {
             echo '<a class="toplink icon_app" name="toplink" rel="app">';
             echo $label;
             echo '</a>';
             if ($gpAdmin['gpui_vis'] == 'app') {
                 echo '<div class="panelgroup2 in_window">';
             } else {
                 echo '<div class="panelgroup2 in_window nodisplay">';
             }
         }
         echo '<ul class="submenu">';
         echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Appearance'] . '</a></li>';
         echo $links;
         echo '</ul>';
         echo '</div>';
         echo '</div>';
     }
     //add-ons
     $links = admin_tools::GetAddonLinks($in_panel);
     if (!empty($links)) {
         echo '<div class="panelgroup">';
         $label = '<span>' . $langmessage['plugins'] . '</span>';
         if (!$in_panel) {
             echo '<span class="icon_plug">' . $label . '</span>';
             echo '<div class="panelgroup2">';
         } else {
             echo '<a class="toplink icon_plug" name="toplink" rel="add">';
             echo $label;
             echo '</a>';
             if ($gpAdmin['gpui_vis'] == 'add') {
                 echo '<div class="panelgroup2 in_window">';
             } else {
                 echo '<div class="panelgroup2 in_window nodisplay">';
             }
         }
         echo '<ul class="submenu">';
         echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['plugins'] . '</a></li>';
         echo $links;
         echo '</ul>';
         echo '</div>';
         echo '</div>';
     }
     //settings
     if ($links = admin_tools::GetAdminGroup('settings')) {
         echo '<div class="panelgroup">';
         $label = '<span>' . $langmessage['Settings'] . '</span>';
         if (!$in_panel) {
             echo '<span class="icon_cog">' . $label . '</span>';
             echo '<div class="panelgroup2">';
         } else {
             echo '<a class="toplink icon_cog" name="toplink" rel="set">';
開發者ID:rizub4u,項目名稱:gpEasy-CMS,代碼行數:67,代碼來源:admin_tools.php


注:本文中的admin_tools::GetAddonLinks方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。