本文整理汇总了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);
}
示例2: getContents
function getContents(&$templateMgr)
{
if (Request::getRequestedPage() . '/' . Request::getRequestedOp() !== 'record/view') {
return '';
}
return parent::getContents($templateMgr);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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 '';
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}