本文整理汇总了PHP中Handler::setupTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP Handler::setupTemplate方法的具体用法?PHP Handler::setupTemplate怎么用?PHP Handler::setupTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Handler
的用法示例。
在下文中一共展示了Handler::setupTemplate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setupTemplate
/**
* Setup common template variables.
* @param $subclass boolean set to true if caller is below this handler in the hierarchy
*/
function setupTemplate($subclass = false)
{
parent::setupTemplate();
$templateMgr =& TemplateManager::getManager();
$templateMgr->setCacheability(CACHEABILITY_PUBLIC);
$templateMgr->assign('pageHierachy', array(array(Request::url(null, null, 'announcements'), 'announcement.announcements')));
}
示例2: setupTemplate
/**
* Setup common template variables.
* @param $subclass boolean set to true if caller is below this handler in the hierarchy
*/
function setupTemplate($subclass = false)
{
parent::setupTemplate();
AppLocale::requireComponents(LOCALE_COMPONENT_PKP_ADMIN, LOCALE_COMPONENT_OJS_ADMIN, LOCALE_COMPONENT_OJS_MANAGER);
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('pageHierarchy', $subclass ? array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'admin'), 'admin.siteAdmin')) : array(array(Request::url(null, 'user'), 'navigation.user')));
}
示例3: setupTemplate
function setupTemplate()
{
parent::setupTemplate();
$templateMgr =& TemplateManager::getManager();
$pageHierarchy = array(array(Request::url(null, 'referral', 'index'), 'plugins.generic.referral.referrals'));
$templateMgr->assign('pageHierarchy', $pageHierarchy);
}
示例4: setupTemplate
/**
* Setup common template variables.
* @param $subclass boolean set to true if caller is below this handler in the hierarchy
*/
function setupTemplate($subclass = false)
{
parent::setupTemplate();
$templateMgr =& TemplateManager::getManager();
if ($subclass) {
$templateMgr->assign('pageHierarchy', array(array(Request::url('admin'), 'admin.siteAdmin')));
}
}
示例5: setupTemplate
/**
* Setup common template variables.
* @param $subclass boolean set to true if caller is below this handler in the hierarchy
*/
function setupTemplate($request, $subclass = false)
{
parent::setupTemplate($request);
$this->validate();
$templateMgr =& TemplateManager::getManager($request);
if ($subclass) {
$templateMgr->assign('pageHierarchy', array(array('about', 'navigation.about')));
}
}
示例6: setupTemplate
/**
* Setup common template variables.
* @param $subclass boolean set to true if caller is below this handler in the hierarchy
*/
function setupTemplate($subclass = false)
{
parent::setupTemplate();
$templateMgr =& TemplateManager::getManager();
$journal =& Request::getJournal();
Locale::requireComponents(array(LOCALE_COMPONENT_OJS_MANAGER, LOCALE_COMPONENT_PKP_MANAGER));
if (!$journal || !$journal->getSetting('restrictSiteAccess')) {
$templateMgr->setCacheability(CACHEABILITY_PUBLIC);
}
$templateMgr->assign('pageHierarchy', array(array(Request::url(null, 'about'), 'about.aboutTheJournal')));
}
示例7: setupTemplate
function setupTemplate($subclass = true)
{
parent::setupTemplate();
$templateMgr =& TemplateManager::getManager();
AppLocale::requireComponents(array(LOCALE_COMPONENT_PKP_ADMIN, LOCALE_COMPONENT_PKP_MANAGER));
$pageHierarchy = array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'admin'), 'admin.siteAdmin'));
if ($subclass) {
$pageHierarchy[] = array(Request::url(null, 'translate'), 'plugins.generic.translator.name');
}
$templateMgr->assign('pageHierarchy', $pageHierarchy);
$templateMgr->assign('helpTopicId', 'plugins.generic.TranslatorPlugin');
}
示例8: setupTemplate
/**
* Setup common template variables.
* @param $archive object optional
* @param $isSubclass boolean optional
*/
function setupTemplate(&$archive, $isSubclass = null)
{
parent::setupTemplate();
$templateMgr =& TemplateManager::getManager();
$hierarchy = array();
if ($isSubclass) {
$hierarchy[] = array(Request::url('browse'), 'navigation.browse');
}
if ($archive) {
$hierarchy[] = array(Request::url('browse', 'index', $archive->getArchiveId()), $archive->getTitle(), true);
}
$templateMgr->assign('pageHierarchy', $hierarchy);
}
示例9: setupTemplate
/**
* Setup variables for the template
* @param $request Request
*/
function setupTemplate($request)
{
parent::setupTemplate($request);
AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_APP_EDITOR);
$templateMgr = TemplateManager::getManager($request);
$submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
$stageId = $this->getAuthorizedContextObject(ASSOC_TYPE_WORKFLOW_STAGE);
$galley = $this->getAuthorizedContextObject(ASSOC_TYPE_GALLEY);
// Assign the authorized submission.
$templateMgr->assign('submission', $submission);
$templateMgr->assign('stageId', $stageId);
$templateMgr->assign('galley', $galley);
}
示例10: sendEmailERCMembers
function sendEmailERCMembers($send = false)
{
parent::setupTemplate();
Locale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_OJS_AUTHOR, LOCALE_COMPONENT_OJS_MANAGER));
import('classes.mail.MailTemplate');
$email = new MailTemplate();
if (Request::getUserVar('send') && !$email->hasErrors()) {
HookRegistry::call('SendEmailHandler::sendEmailERCMembers', array(&$send));
$email->send();
$user =& Request::getUser();
Request::redirect(null, null, 'section', $user->getSecretaryCommitteeId());
} else {
$sender =& Request::getUser();
$journal =& Request::getJournal();
$ercReviewersDao =& DAORegistry::getDAO('ErcReviewersDAO');
$sectionDao =& DAORegistry::getDAO('SectionDAO');
$ercId = $sender->getSecretaryCommitteeId();
//Get ERC Members
$reviewers = $ercReviewersDao->getReviewersBySectionId($journal->getId(), $ercId);
//Get already added recipients
$recipients =& $email->getRecipients();
if (isset($recipients)) {
$totalRecipients = count($recipients);
} else {
$totalRecipients = 0;
}
foreach ($reviewers as $reviewer) {
// Check if new recipient is not already added
$isNotInTheList = true;
if (isset($recipients)) {
foreach ($recipients as $recipient) {
if ($recipient['email'] == $reviewer->getEmail()) {
$isNotInTheList = false;
}
}
}
//Add new recipients according the committee
if ($sender->getId() != $reviewer->getId() && $isNotInTheList == true) {
$email->addRecipient($reviewer->getEmail(), $reviewer->getFullName());
$totalRecipients++;
}
}
$templateMgr =& TemplateManager::getManager();
$pageHierarchy = array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'sectionEditor'), 'user.role.sectionEditor'), array(Request::url(null, 'sectionEditor', 'section', $ercId), 'section.section'));
$templateMgr->assign('pageHierarchy', $pageHierarchy);
$email->displayEditForm(Request::url(null, null, 'sendEmailERCMembers', 'send'), null, 'email/email.tpl', array('totalRecipients' => $totalRecipients));
}
}
示例11: setupTemplate
/**
* Setup common template variables.
* @param $subclass boolean set to true if caller is below this handler in the hierarchy
*/
function setupTemplate()
{
parent::setupTemplate();
Locale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_OJS_AUTHOR, LOCALE_COMPONENT_OJS_MANAGER));
$templateMgr =& TemplateManager::getManager();
$isEditor = Validation::isEditor();
if (Request::getRequestedPage() == 'editor') {
$templateMgr->assign('helpTopicId', 'editorial.editorsRole');
} else {
$templateMgr->assign('helpTopicId', 'editorial.sectionEditorsRole');
}
$roleSymbolic = $isEditor ? 'editor' : 'sectionEditor';
$roleKey = $isEditor ? 'user.role.coordinator' : 'user.role.sectionEditor';
$pageHierarchy = array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'user'), $roleKey), array(Request::url(null, $roleSymbolic, 'submissionsReport'), 'editor.reports.reportGenerator'));
$templateMgr->assign('pageHierarchy', $pageHierarchy);
}
示例12: setupTemplate
/**
* Setup common template variables.
* @param $record object optional
* @param $subclass boolean set to true if caller is below this handler in the hierarchy
*/
function setupTemplate(&$record, $subclass = false)
{
parent::setupTemplate();
$templateMgr =& TemplateManager::getManager();
$hierarchy = array();
if ($subclass) {
$hierarchy[] = array(Request::url('browse'), 'navigation.browse');
}
if ($record) {
$archiveDao =& DAORegistry::getDAO('ArchiveDAO');
$archive =& $archiveDao->getArchive($record->getArchiveId(), false);
$hierarchy[] = array(Request::url('browse', 'index', $archive->getArchiveId()), $archive->getTitle(), true);
}
$templateMgr->assign('pageHierarchy', $hierarchy);
$templateMgr->assign('theseArchiveIds', array($archive->getArchiveId()));
}
示例13: setupTemplate
/**
* Setup common template variables.
* @param $subclass boolean set to true if caller is below this handler in the hierarchy
*/
function setupTemplate($subclass = true)
{
parent::setupTemplate();
$conference =& Request::getConference();
$schedConf =& Request::getSchedConf();
$templateMgr =& TemplateManager::getManager();
$templateMgr->setCacheability(CACHEABILITY_PUBLIC);
AppLocale::requireComponents(array(LOCALE_COMPONENT_OCS_MANAGER, LOCALE_COMPONENT_PKP_MANAGER));
$pageHierarchy = array();
if ($conference) {
$pageHierarchy[] = array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true);
}
if ($schedConf) {
$pageHierarchy[] = array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true);
}
if ($subclass) {
$pageHierarchy[] = array(Request::url(null, null, 'about'), 'about.aboutTheConference');
}
$templateMgr->assign('pageHierarchy', $pageHierarchy);
}
示例14: setupTemplate
/**
* Setup common template variables.
* @param $subclass boolean set to true if caller is below this handler in the hierarchy
*/
function setupTemplate($request, $subclass = false)
{
parent::setupTemplate($request);
AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_APP_MANAGER, LOCALE_COMPONENT_PKP_ADMIN);
$templateMgr =& TemplateManager::getManager($request);
$pageHierarchy = array();
$conference =& $request->getConference();
$schedConf =& $request->getSchedConf();
if ($schedConf) {
$pageHierarchy[] = array($request->url(null, null, 'index'), $schedConf->getLocalizedName(), true);
} elseif ($conference) {
$pageHierarchy[] = array($request->url(null, 'index', 'index'), $conference->getLocalizedName(), true);
}
if ($subclass) {
$pageHierarchy[] = array($request->url(null, null, 'user'), 'navigation.user');
$pageHierarchy[] = array($request->url(null, 'index', 'manager'), 'manager.conferenceSiteManagement');
} else {
$pageHierarchy[] = array($request->url(null, null, 'user'), 'navigation.user');
}
$templateMgr->assign('pageHierarchy', $pageHierarchy);
}
示例15: setupTemplate
/**
* Setup common template variables.
* @param $subclass boolean set to true if caller is below this handler in the hierarchy
*/
function setupTemplate($subclass = false, $meetingId = 0, $parentPage = null, $showSidebar = true)
{
parent::setupTemplate();
Locale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_OJS_AUTHOR, LOCALE_COMPONENT_OJS_MANAGER));
$templateMgr =& TemplateManager::getManager();
$isEditor = Validation::isEditor();
if (Request::getRequestedPage() == 'editor') {
$templateMgr->assign('helpTopicId', 'editorial.editorsRole');
} else {
$templateMgr->assign('helpTopicId', 'editorial.sectionEditorsRole');
}
$roleSymbolic = $isEditor ? 'editor' : 'sectionEditor';
$roleKey = $isEditor ? 'user.role.editor' : 'user.role.sectionEditor';
$pageHierarchy = $subclass ? array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, $roleSymbolic), $roleKey), array(Request::url(null, $roleSymbolic, 'meetings'), 'editor.meetings')) : array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, $roleSymbolic), $roleKey));
if ($meetingId != 0) {
$meetingDao =& DAORegistry::getDAO('MeetingDAO');
$meeting =& $meetingDao->getMeetingById($meetingId);
$publicId = $meeting->getPublicId();
$pageHierarchy[] = array(Request::url(null, 'sectionEditor', 'viewMeeting', $meetingId), "#{$publicId}", true);
}
$templateMgr->assign('pageHierarchy', $pageHierarchy);
}