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


PHP PHPWS_Core::getModuleNames方法代碼示例

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


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

示例1: get

 public static function get()
 {
     if (!\Current_User::isLogged()) {
         return;
     }
     $modlist = PHPWS_Core::getModuleNames();
     $tpl['MINIADMIN_TITLE'] = dgettext('miniadmin', 'MiniAdmin');
     $tpl['MINIADMIN_TITLE_ALT'] = dgettext('miniadmin', 'Administrate');
     if (isset($GLOBALS['MiniAdmin'])) {
         foreach ($GLOBALS['MiniAdmin'] as $module => $links) {
             $mod_title = $modlist[$module];
             if (isset($links['title_link'])) {
                 $mod_title = sprintf('<a href="%s">%s</a>', $links['title_link'], $mod_title);
             }
             $module_links[$mod_title] = $links;
         }
         $tpl['module_links'] = $module_links;
     }
     $template = new \Template($tpl);
     $template->setModuleTemplate('miniadmin', MINIADMIN_TEMPLATE);
     $content = $template->get();
     Layout::set($content, 'miniadmin', 'mini_admin');
 }
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:23,代碼來源:MiniAdmin.php

示例2: getTplTags

 public function getTplTags()
 {
     $module_names = PHPWS_Core::getModuleNames();
     $tpl['ID'] = $this->id;
     $tpl['MODULE'] = $module_names[$this->module];
     $tpl['ITEM_ID'] = $this->item_id;
     $tpl['TITLE'] = $this->title;
     $tpl['URL'] = $this->getUrl();
     $tpl['SUMMARY'] = $this->summary;
     $tpl['CREATOR'] = $this->creator;
     $tpl['UPDATER'] = $this->updater;
     $tpl['CREATE_DATE'] = $this->getCreateDate();
     $tpl['UPDATE_DATE'] = $this->getUpdateDate();
     return $tpl;
 }
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:15,代碼來源:Key.php

示例3: rowTags

 public function rowTags()
 {
     PHPWS_Core::requireConfig('filecabinet', 'config.php');
     if (FC_ICON_PAGER_LINKS) {
         $mode = 'icon';
         $spacer = '';
     } else {
         $mode = null;
         $spacer = ' | ';
     }
     //$icon = sprintf('<img src="%s" />', $this->icon);
     $vars['aop'] = 'view_folder';
     $vars['folder_id'] = $this->id;
     $tpl['TITLE'] = PHPWS_Text::moduleLink($this->title, 'filecabinet', $vars);
     $tpl['ITEMS'] = $this->tallyItems();
     if (Current_User::allow('filecabinet', 'edit_folders', $this->id, 'folder')) {
         $links[] = $this->editLink('image');
         $links[] = $this->uploadLink('icon');
     }
     if (Current_User::allow('filecabinet', 'edit_folders', $this->id, 'folder', true)) {
         if ($this->key_id) {
             $links[] = Current_User::popupPermission($this->key_id, null, $mode);
         }
     }
     if (Current_User::allow('filecabinet', 'delete_folders', null, null, true)) {
         $links[] = $this->deleteLink('image');
     }
     $mods = PHPWS_Core::getModuleNames();
     if ($this->module_created && isset($mods[$this->module_created])) {
         $tpl['MODULE_CREATED'] = $mods[$this->module_created];
     } else {
         $tpl['MODULE_CREATED'] = dgettext('filecabinet', 'General');
     }
     $tpl['PUBLIC'] = $this->getPublic();
     if (@$links) {
         $tpl['LINKS'] = implode($spacer, $links);
     }
     return $tpl;
 }
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:39,代碼來源:Folder.php


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