• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP BlockPlugin类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getContents

 /**
  * @see BlockPlugin::getContents
  */
 function getContents($templateMgr, $request = null)
 {
     $journal = $request->getJournal();
     if (!$journal) {
         return '';
     }
     $templateMgr->assign(array('forReaders' => $journal->getLocalizedSetting('readerInformation'), 'forAuthors' => $journal->getLocalizedSetting('authorInformation'), 'forLibrarians' => $journal->getLocalizedSetting('librarianInformation')));
     return parent::getContents($templateMgr, $request);
 }
开发者ID:pkp,项目名称:ojs,代码行数:12,代码来源:InformationBlockPlugin.inc.php


示例2: getContents

 /**
  * @see BlockPlugin::getContents()
  */
 function getContents(&$templateMgr, $request = null)
 {
     // Get facets from the parent plug-in.
     $plugin =& $this->_getLucenePlugin();
     $facets = $plugin->getFacets();
     // Check whether we got any facets to display.
     $hasFacets = false;
     if (is_array($facets)) {
         foreach ($facets as $facetCategory => $facetList) {
             if (count($facetList) > 0) {
                 $hasFacets = true;
                 break;
             }
         }
     }
     // Do not display the block if we got no facets.
     if (!$hasFacets) {
         return '';
     }
     $templateMgr->assign('facets', $facets);
     return parent::getContents($templateMgr, $request);
 }
开发者ID:laelnasan,项目名称:UTFPR-ojs,代码行数:25,代码来源:LuceneFacetsBlockPlugin.inc.php


示例3: getContents

 /**
  * @see BlockPlugin::getContents
  */
 function getContents(&$templateMgr, $request = null)
 {
     $journal = $request->getJournal();
     if (!$journal) {
         return '';
     }
     if (!$journal->getSetting('enableAnnouncements')) {
         return '';
     }
     $plugin =& $this->getAnnouncementFeedPlugin();
     $displayPage = $plugin->getSetting($journal->getId(), 'displayPage');
     $requestedPage = $request->getRequestedPage();
     if ($displayPage == 'all' || $displayPage == 'homepage' && (empty($requestedPage) || $requestedPage == 'index' || $requestedPage == 'announcement') || $displayPage == $requestedPage) {
         return parent::getContents($templateMgr, $request);
     } else {
         return '';
     }
 }
开发者ID:laelnasan,项目名称:UTFPR-ojs,代码行数:21,代码来源:AnnouncementFeedBlockPlugin.inc.php


示例4: getContents

 /**
  * Get the HTML contents for this block.
  * @param $templateMgr PKPTemplateManager
  * @param $request PKPRequest
  * @return String
  */
 function getContents(&$templateMgr, $request = null)
 {
     if ($request->getRequestedPage() . '/' . $request->getRequestedOp() !== 'record/view') {
         return '';
     }
     return parent::getContents($templateMgr, $request);
 }
开发者ID:Rygbee,项目名称:harvester,代码行数:13,代码来源:RTBlockPlugin.inc.php


示例5: getContents

 function getContents(&$templateMgr)
 {
     if (Request::getRequestedPage() . '/' . Request::getRequestedOp() !== 'record/view') {
         return '';
     }
     return parent::getContents($templateMgr);
 }
开发者ID:ramonsodoma,项目名称:harvester,代码行数:7,代码来源:RTBlockPlugin.inc.php


示例6: getSeq

 /**
  * Determine the plugin sequence. Overrides parent so that
  * the plugin will be displayed during install.
  */
 function getSeq()
 {
     if (!Config::getVar('general', 'installed')) {
         return 0;
     }
     return parent::getSeq();
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:11,代码来源:HelpBlockPlugin.inc.php


示例7: getContents

 function getContents(&$templateMgr)
 {
     $pressDao =& DAORegistry::getDAO('PressDAO');
     $presses =& $pressDao->getPresses();
     $presses =& $presses->toArray();
     $templateMgr->assign_by_ref('presses', $presses);
     return parent::getContents($templateMgr);
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:8,代码来源:SelectPressBlockPlugin.inc.php


示例8: register

 function register($category, $path)
 {
     $success = parent::register($category, $path);
     if ($success) {
         $this->addLocaleData();
     }
     return $success;
 }
开发者ID:sedici,项目名称:ocs,代码行数:8,代码来源:RoleBlockPlugin.inc.php


示例9: getContents

 function getContents(&$templateMgr)
 {
     if (!defined('SESSION_DISABLE_INIT')) {
         $session =& Request::getSession();
         $templateMgr->assign_by_ref('userSession', $session);
         $templateMgr->assign('loggedInUsername', $session->getSessionVar('username'));
     }
     return parent::getContents($templateMgr);
 }
开发者ID:jalperin,项目名称:harvester,代码行数:9,代码来源:UserBlockPlugin.inc.php


示例10: getContents

 /**
  * Get the HTML contents for this block.
  * @param $templateMgr object
  * @return $string
  */
 function getContents(&$templateMgr)
 {
     $conference =& Request::getConference();
     if (!$conference) {
         return '';
     }
     $templateMgr->assign('forReaders', $conference->getLocalizedSetting('readerInformation'));
     $templateMgr->assign('forAuthors', $conference->getLocalizedSetting('authorInformation'));
     return parent::getContents($templateMgr);
 }
开发者ID:ramonsodoma,项目名称:ocs,代码行数:15,代码来源:InformationBlockPlugin.inc.php


示例11: getContents

 /**
  * Get the HTML contents for this block.
  * @param $templateMgr object
  * @return $string
  */
 function getContents(&$templateMgr)
 {
     // Only show the block for article pages.
     switch (Request::getRequestedPage() . '/' . Request::getRequestedOp()) {
         case 'article/view':
             return parent::getContents($templateMgr);
         default:
             return '';
     }
 }
开发者ID:reconciler,项目名称:ojs,代码行数:15,代码来源:AuthorBiosBlockPlugin.inc.php


示例12: getContents

 function getContents(&$templateMgr)
 {
     $navMenuItems = $templateMgr->get_template_vars('navMenuItems');
     foreach ($navMenuItems as $navMenuKey => $navMenuItem) {
         $navMenuItems[$navMenuKey] = array_filter($navMenuItem);
     }
     $navMenuItems = array_filter($navMenuItems);
     $templateMgr->assign('countNavMenuItems', count($navMenuItems));
     return parent::getContents($templateMgr);
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:10,代码来源:LinksBlockPlugin.inc.php


示例13: getContents

 function getContents(&$templateMgr)
 {
     $journal =& Request::getJournal();
     if (!$journal) {
         return '';
     }
     import('classes.payment.ojs.OJSPaymentManager');
     $paymentManager =& OJSPaymentManager::getManager();
     $templateMgr->assign('donationEnabled', $paymentManager->donationEnabled());
     return parent::getContents($templateMgr);
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:11,代码来源:DonationBlockPlugin.inc.php


示例14: getContents

 function getContents(&$templateMgr)
 {
     $user =& Request::getUser();
     $journal =& Request::getJournal();
     if ($user && $journal) {
         $userId = $user->getId();
         $notificationDao =& DAORegistry::getDAO('NotificationDAO');
         $templateMgr->assign('unreadNotifications', $notificationDao->getUnreadNotificationCount($userId));
     }
     return parent::getContents($templateMgr);
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:11,代码来源:NotificationBlockPlugin.inc.php


示例15: getContents

 /**
  * Get the HTML contents for this block.
  * @param $templateMgr object
  * @param $request PKPRequest
  * @return $string
  */
 function getContents(&$templateMgr, $request = null)
 {
     $user =& $request->getUser();
     $conference =& $request->getConference();
     if ($user && $conference) {
         $userId = $user->getId();
         $notificationDao = DAORegistry::getDAO('NotificationDAO');
         $templateMgr->assign('unreadNotifications', $notificationDao->getNotificationCount(false, $userId, $conference->getId()));
     }
     return parent::getContents($templateMgr, $request);
 }
开发者ID:artkuo,项目名称:ocs,代码行数:17,代码来源:NotificationBlockPlugin.inc.php


示例16: getContents

 /**
  * Get the HTML contents for this block.
  * @param $templateMgr object
  * @return $string
  */
 function getContents(&$templateMgr, $request = null)
 {
     $press = $request->getPress();
     if (!$press) {
         return '';
     }
     $templateMgr->assign('forReaders', $press->getLocalizedSetting('readerInformation'));
     $templateMgr->assign('forAuthors', $press->getLocalizedSetting('authorInformation'));
     $templateMgr->assign('forLibrarians', $press->getLocalizedSetting('librarianInformation'));
     return parent::getContents($templateMgr);
 }
开发者ID:josekarvalho,项目名称:omp,代码行数:16,代码来源:InformationBlockPlugin.inc.php


示例17: getContents

 /**
  * Get the HTML contents for this block.
  * @param $templateMgr object
  * @return $string
  */
 function getContents(&$templateMgr)
 {
     $journal =& Request::getJournal();
     if (!$journal) {
         return '';
     }
     $templateMgr->assign('forReaders', $journal->getLocalizedSetting('readerInformation'));
     $templateMgr->assign('forAuthors', $journal->getLocalizedSetting('authorInformation'));
     $templateMgr->assign('forLibrarians', $journal->getLocalizedSetting('librarianInformation'));
     return parent::getContents($templateMgr);
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:16,代码来源:InformationBlockPlugin.inc.php


示例18: getContents

 /**
  * Get the HTML contents for this block.
  * @param $templateMgr object
  * @param $request PKPRequest
  * @return $string
  */
 function getContents(&$templateMgr, $request = null)
 {
     if (!defined('SESSION_DISABLE_INIT')) {
         $session =& $request->getSession();
         $templateMgr->assign_by_ref('userSession', $session);
         $templateMgr->assign('loggedInUsername', $session->getSessionVar('username'));
         $loginUrl = $request->url(null, null, 'login', 'signIn');
         if (Config::getVar('security', 'force_login_ssl')) {
             $loginUrl = String::regexp_replace('/^http:/', 'https:', $loginUrl);
         }
         $templateMgr->assign('userBlockLoginUrl', $loginUrl);
     }
     return parent::getContents($templateMgr, $request);
 }
开发者ID:artkuo,项目名称:ocs,代码行数:20,代码来源:UserBlockPlugin.inc.php


示例19: getContents

 function getContents(&$templateMgr)
 {
     if (!defined('SESSION_DISABLE_INIT')) {
         $session =& Request::getSession();
         $templateMgr->assign_by_ref('userSession', $session);
         $templateMgr->assign('loggedInUsername', $session->getSessionVar('username'));
         $loginUrl = Request::url(null, 'login', 'signIn');
         $templateMgr->assign('paperPackageUpPlugin', "/index.php/mr2/PaperPackageUpPlugin/view/");
         if (Config::getVar('security', 'force_login_ssl')) {
             $loginUrl = String::regexp_replace('/^http:/', 'https:', $loginUrl);
         }
         $templateMgr->assign('userBlockLoginUrl', $loginUrl);
     }
     return parent::getContents($templateMgr);
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:15,代码来源:ExtendedUserBlockPlugin.inc.php


示例20: getContents

 function getContents(&$templateMgr)
 {
     $journal =& Request::getJournal();
     $journal_id = $journal->getId();
     $templateMgr->assign('packageCount', 0);
     $articleDao =& DAORegistry::getDAO('ArticleDAO');
     $resultFacotry =& $articleDao->getArticlesByJournalId($journal_id);
     $result = $resultFacotry->getCount();
     //	error_log('OJS - CountBlock: Was ist das Result ' . $result);
     //$result = $this->retrieve("select count(*) as c from published_articles WHERE date_published IS NOT NULL", array());
     $templateMgr->assign('packageCount', $result);
     //if(!$result->EOF){
     //  $templateMgr->assign('packageCount', intval($row['c']));
     //}
     return parent::getContents($templateMgr);
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:16,代码来源:CountBlockPlugin.inc.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP BlockType类代码示例发布时间:2022-05-23
下一篇:
PHP BlockInstance类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap