本文整理汇总了PHP中BlockPlugin类的典型用法代码示例。如果您正苦于以下问题:PHP BlockPlugin类的具体用法?PHP BlockPlugin怎么用?PHP BlockPlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BlockPlugin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: 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);
}
示例3: getContents
function getContents(&$templateMgr)
{
if (Request::getRequestedPage() . '/' . Request::getRequestedOp() !== 'record/view') {
return '';
}
return parent::getContents($templateMgr);
}
示例4: 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();
}
示例5: getContents
function getContents(&$templateMgr)
{
$pressDao =& DAORegistry::getDAO('PressDAO');
$presses =& $pressDao->getPresses();
$presses =& $presses->toArray();
$templateMgr->assign_by_ref('presses', $presses);
return parent::getContents($templateMgr);
}
示例6: register
function register($category, $path)
{
$success = parent::register($category, $path);
if ($success) {
$this->addLocaleData();
}
return $success;
}
示例7: 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);
}
示例8: 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);
}
示例9: 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 '';
}
}
示例10: 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);
}
示例11: 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);
}
示例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
* @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);
}
示例14: 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);
}
示例15: 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);
}