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


PHP BlockPlugin::getContents方法代碼示例

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


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

示例1: 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

示例2: getContents

 function getContents(&$templateMgr)
 {
     if (Request::getRequestedPage() . '/' . Request::getRequestedOp() !== 'record/view') {
         return '';
     }
     return parent::getContents($templateMgr);
 }
開發者ID:ramonsodoma,項目名稱:harvester,代碼行數:7,代碼來源:RTBlockPlugin.inc.php

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: getContents

 function getContents(&$templateMgr)
 {
     $journal =& Request::getJournal();
     if (!$journal) {
         return '';
     }
     $PopularArticlesDAO =& DAORegistry::getDAO('PopularArticlesDAO');
     $templateMgr->assign('popularArticles', $PopularArticlesDAO->getPopularArticles($journal->getJournalId(), $this->getQuantity()));
     $journalDao =& DAORegistry::getDAO('JournalDAO');
     $templateMgr->assign_by_ref('journalDao', $journalDao);
     return parent::getContents($templateMgr);
 }
開發者ID:alexukua,項目名稱:j2test,代碼行數:12,代碼來源:PopularArticlesBlockPlugin.inc.php

示例15: 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


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