当前位置: 首页>>代码示例>>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;未经允许,请勿转载。