当前位置: 首页>>代码示例>>PHP>>正文


PHP Handler::setupTemplate方法代码示例

本文整理汇总了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')));
 }
开发者ID:anorton,项目名称:pkp-lib,代码行数:11,代码来源:PKPAnnouncementHandler.inc.php

示例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')));
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:11,代码来源:AdminHandler.inc.php

示例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);
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:7,代码来源:ReferralHandler.inc.php

示例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')));
     }
 }
开发者ID:ramonsodoma,项目名称:harvester,代码行数:12,代码来源:AdminHandler.inc.php

示例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')));
     }
 }
开发者ID:Rygbee,项目名称:harvester,代码行数:13,代码来源:AboutHandler.inc.php

示例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')));
 }
开发者ID:philschatz,项目名称:ojs,代码行数:15,代码来源:AboutHandler.inc.php

示例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');
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:12,代码来源:TranslatorHandler.inc.php

示例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);
 }
开发者ID:ramonsodoma,项目名称:harvester,代码行数:18,代码来源:BrowseHandler.inc.php

示例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);
 }
开发者ID:utlib,项目名称:ojs,代码行数:17,代码来源:GalleyHandler.inc.php

示例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));
     }
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:48,代码来源:SendEmailHandler.inc.php

示例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);
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:20,代码来源:ReportsHandler.inc.php

示例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()));
 }
开发者ID:jalperin,项目名称:harvester,代码行数:21,代码来源:RecordHandler.inc.php

示例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);
 }
开发者ID:sedici,项目名称:ocs,代码行数:24,代码来源:AboutHandler.inc.php

示例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);
 }
开发者ID:artkuo,项目名称:ocs,代码行数:25,代码来源:ManagerHandler.inc.php

示例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);
 }
开发者ID:elavaud,项目名称:hrp_ct,代码行数:26,代码来源:MinutesHandler.inc.php


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