當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。