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


PHP AppLocale::Translate方法代码示例

本文整理汇总了PHP中AppLocale::Translate方法的典型用法代码示例。如果您正苦于以下问题:PHP AppLocale::Translate方法的具体用法?PHP AppLocale::Translate怎么用?PHP AppLocale::Translate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AppLocale的用法示例。


在下文中一共展示了AppLocale::Translate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fetch

 /**
  * Fetch the form.
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $journal = $request->getJournal();
     // set up the accessibility options pulldown
     $templateMgr->assign('enableDelayedOpenAccess', $journal->getSetting('enableDelayedOpenAccess'));
     $templateMgr->assign('accessOptions', array(ISSUE_ACCESS_OPEN => AppLocale::Translate('editor.issues.openAccess'), ISSUE_ACCESS_SUBSCRIPTION => AppLocale::Translate('editor.issues.subscription')));
     if ($this->issue) {
         $templateMgr->assign('issue', $this->issue);
         $templateMgr->assign('issueId', $this->issue->getId());
     }
     // Cover image preview
     $coverImage = null;
     if ($this->issue) {
         $coverImage = $this->issue->getCoverImage();
     }
     // Cover image delete link action
     if ($coverImage) {
         import('lib.pkp.classes.linkAction.LinkAction');
         import('lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal');
         $router = $request->getRouter();
         $deleteCoverImageLinkAction = new LinkAction('deleteCoverImage', new RemoteActionConfirmationModal($request->getSession(), __('common.confirmDelete'), null, $router->url($request, null, null, 'deleteCoverImage', null, array('coverImage' => $coverImage, 'issueId' => $this->issue->getId())), 'modal_delete'), __('common.delete'), null);
         $templateMgr->assign('deleteCoverImageLinkAction', $deleteCoverImageLinkAction);
     }
     return parent::fetch($request);
 }
开发者ID:bkroll,项目名称:ojs,代码行数:29,代码来源:IssueForm.inc.php

示例2: sendReminder

 function sendReminder($subscription, $journal, $emailKey)
 {
     $userDao = DAORegistry::getDAO('UserDAO');
     $subscriptionTypeDao = DAORegistry::getDAO('SubscriptionTypeDAO');
     $journalName = $journal->getLocalizedName();
     $user = $userDao->getById($subscription->getUserId());
     if (!isset($user)) {
         return false;
     }
     $subscriptionType = $subscriptionTypeDao->getSubscriptionType($subscription->getTypeId());
     $subscriptionName = $journal->getSetting('subscriptionName');
     $subscriptionEmail = $journal->getSetting('subscriptionEmail');
     $subscriptionPhone = $journal->getSetting('subscriptionPhone');
     $subscriptionMailingAddress = $journal->getSetting('subscriptionMailingAddress');
     $subscriptionContactSignature = $subscriptionName;
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_APP_COMMON);
     if ($subscriptionMailingAddress != '') {
         $subscriptionContactSignature .= "\n" . $subscriptionMailingAddress;
     }
     if ($subscriptionPhone != '') {
         $subscriptionContactSignature .= "\n" . AppLocale::Translate('user.phone') . ': ' . $subscriptionPhone;
     }
     $subscriptionContactSignature .= "\n" . AppLocale::Translate('user.email') . ': ' . $subscriptionEmail;
     $paramArray = array('subscriberName' => $user->getFullName(), 'journalName' => $journalName, 'subscriptionType' => $subscriptionType->getSummaryString(), 'expiryDate' => $subscription->getDateEnd(), 'username' => $user->getUsername(), 'subscriptionContactSignature' => $subscriptionContactSignature);
     import('lib.pkp.classes.mail.MailTemplate');
     $mail = new MailTemplate($emailKey, $journal->getPrimaryLocale(), $journal, false);
     $mail->setReplyTo($subscriptionEmail, $subscriptionName);
     $mail->addRecipient($user->getEmail(), $user->getFullName());
     $mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
     $mail->setBody($mail->getBody($journal->getPrimaryLocale()));
     $mail->assignParams($paramArray);
     $mail->send();
 }
开发者ID:mariojp,项目名称:ojs,代码行数:33,代码来源:SubscriptionExpiryReminder.inc.php

示例3: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $journal =& Request::getJournal();
     // set up the accessibility options pulldown
     $templateMgr->assign('enableDelayedOpenAccess', $journal->getSetting('enableDelayedOpenAccess'));
     $templateMgr->assign('accessOptions', array(ISSUE_ACCESS_OPEN => AppLocale::Translate('editor.issues.openAccess'), ISSUE_ACCESS_SUBSCRIPTION => AppLocale::Translate('editor.issues.subscription')));
     $templateMgr->assign('enablePublicIssueId', $journal->getSetting('enablePublicIssueId'));
     parent::display();
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:13,代码来源:IssueForm.inc.php

示例4: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $journal =& Request::getJournal();
     // set up the accessibility options pulldown
     $templateMgr->assign('enableDelayedOpenAccess', $journal->getSetting('enableDelayedOpenAccess'));
     $templateMgr->assign('accessOptions', array(ISSUE_ACCESS_OPEN => AppLocale::Translate('editor.issues.openAccess'), ISSUE_ACCESS_SUBSCRIPTION => AppLocale::Translate('editor.issues.subscription')));
     $templateMgr->assign('enablePublicIssueId', $journal->getSetting('enablePublicIssueId'));
     // consider public identifiers
     $pubIdPlugins =& PluginRegistry::loadCategory('pubIds', true);
     $templateMgr->assign('pubIdPlugins', $pubIdPlugins);
     parent::display();
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:16,代码来源:IssueForm.inc.php

示例5: fetch

 /**
  * Fetch the form.
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $journal = $request->getJournal();
     // set up the accessibility options pulldown
     $templateMgr->assign('enableDelayedOpenAccess', $journal->getSetting('enableDelayedOpenAccess'));
     $templateMgr->assign('accessOptions', array(ISSUE_ACCESS_OPEN => AppLocale::Translate('editor.issues.openAccess'), ISSUE_ACCESS_SUBSCRIPTION => AppLocale::Translate('editor.issues.subscription')));
     if ($this->issue) {
         $templateMgr->assign('issue', $this->issue);
         $templateMgr->assign('issueId', $this->issue->getId());
     }
     return parent::fetch($request);
 }
开发者ID:jnugent,项目名称:ojs,代码行数:16,代码来源:IssueForm.inc.php

示例6: fetch

 /**
  * Fetch the form.
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $journal = $request->getJournal();
     // set up the accessibility options pulldown
     $templateMgr->assign('enableDelayedOpenAccess', $journal->getSetting('enableDelayedOpenAccess'));
     $templateMgr->assign('accessOptions', array(ISSUE_ACCESS_OPEN => AppLocale::Translate('editor.issues.openAccess'), ISSUE_ACCESS_SUBSCRIPTION => AppLocale::Translate('editor.issues.subscription')));
     $templateMgr->assign('enablePublicIssueId', $journal->getSetting('enablePublicIssueId'));
     if ($this->issue) {
         $templateMgr->assign('issue', $this->issue);
         $templateMgr->assign('issueId', $this->issue->getId());
     }
     // consider public identifiers
     $templateMgr->assign('pubIdPlugins', PluginRegistry::loadCategory('pubIds', true));
     return parent::fetch($request);
 }
开发者ID:jalperin,项目名称:ojs,代码行数:19,代码来源:IssueForm.inc.php

示例7: advanced

 /**
  * Show advanced search form.
  */
 function advanced()
 {
     parent::validate();
     SearchHandler::setupTemplate(false);
     $templateMgr =& TemplateManager::getManager();
     $publishedPaperDao =& DAORegistry::getDAO('PublishedPaperDAO');
     if (Request::getConference() == null) {
         $conferenceDao =& DAORegistry::getDAO('ConferenceDAO');
         $conferences =& $conferenceDao->getEnabledConferenceTitles();
         //Enabled added
         $templateMgr->assign('siteSearch', true);
         $templateMgr->assign('conferenceOptions', array('' => AppLocale::Translate('search.allConferences')) + $conferences);
         $yearRange = $publishedPaperDao->getPaperYearRange(null);
     } else {
         $conference =& Request::getConference();
         $yearRange = $publishedPaperDao->getPaperYearRange($conference->getId());
     }
     SearchHandler::assignAdvancedSearchParameters($templateMgr, $yearRange);
     $templateMgr->display('search/advancedSearch.tpl');
 }
开发者ID:sedici,项目名称:ocs,代码行数:23,代码来源:SearchHandler.inc.php

示例8: advanced

 /**
  * Show advanced search form.
  * @param $args array
  * @param $request PKPRequest
  */
 function advanced($args, &$request)
 {
     parent::validate();
     $this->setupTemplate($request, false);
     $templateMgr =& TemplateManager::getManager($request);
     $publishedPaperDao = DAORegistry::getDAO('PublishedPaperDAO');
     if ($request->getConference() == null) {
         $conferenceDao = DAORegistry::getDAO('ConferenceDAO');
         $conferences =& $conferenceDao->getNames(true);
         // Enabled added
         $templateMgr->assign('siteSearch', true);
         $templateMgr->assign('conferenceOptions', array('' => AppLocale::Translate('search.allConferences')) + $conferences);
         $yearRange = $publishedPaperDao->getPaperYearRange(null);
     } else {
         $conference =& $request->getConference();
         $yearRange = $publishedPaperDao->getPaperYearRange($conference->getId());
     }
     $this->_assignAdvancedSearchParameters($request, $templateMgr, $yearRange);
     $templateMgr->display('search/advancedSearch.tpl');
 }
开发者ID:artkuo,项目名称:ocs,代码行数:25,代码来源:SearchHandler.inc.php

示例9: advanced

 /**
  * Show advanced search form.
  * @param $args array
  * @param $request PKPRequest
  */
 function advanced($args, &$request)
 {
     $this->validate();
     $this->setupTemplate($request, false);
     $templateMgr =& TemplateManager::getManager();
     $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
     $journal =& $request->getJournal();
     if (!$journal) {
         $journalDao =& DAORegistry::getDAO('JournalDAO');
         $journals =& $journalDao->getJournalTitles(true);
         $templateMgr->assign('siteSearch', true);
         $templateMgr->assign('journalOptions', array('' => AppLocale::Translate('search.allJournals')) + $journals);
         $journalPath = $request->getRequestedJournalPath();
         $yearRange = $publishedArticleDao->getArticleYearRange(null);
     } else {
         $yearRange = $publishedArticleDao->getArticleYearRange($journal->getId());
     }
     $this->_assignAdvancedSearchParameters($request, $templateMgr, $yearRange);
     $templateMgr->display('search/advancedSearch.tpl');
 }
开发者ID:reconciler,项目名称:ojs,代码行数:25,代码来源:SearchHandler.inc.php

示例10: sendReminder

 function sendReminder($registration, $conference, $schedConf, $emailKey)
 {
     $userDao =& DAORegistry::getDAO('UserDAO');
     $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
     $schedConfName = $schedConf->getSchedConfTitle();
     $schedConfId = $schedConf->getId();
     $user =& $userDao->getUser($registration->getUserId());
     if (!isset($user)) {
         return false;
     }
     $registrationType =& $registrationTypeDao->getRegistrationType($registration->getTypeId());
     $registrationName = $schedConf->getSetting('registrationName');
     $registrationEmail = $schedConf->getSetting('registrationEmail');
     $registrationPhone = $schedConf->getSetting('registrationPhone');
     $registrationFax = $schedConf->getSetting('registrationFax');
     $registrationMailingAddress = $schedConf->getSetting('registrationMailingAddress');
     $registrationContactSignature = $registrationName;
     if ($registrationMailingAddress != '') {
         $registrationContactSignature .= "\n" . $registrationMailingAddress;
     }
     if ($registrationPhone != '') {
         $registrationContactSignature .= "\n" . AppLocale::Translate('user.phone') . ': ' . $registrationPhone;
     }
     if ($registrationFax != '') {
         $registrationContactSignature .= "\n" . AppLocale::Translate('user.fax') . ': ' . $registrationFax;
     }
     $registrationContactSignature .= "\n" . AppLocale::Translate('user.email') . ': ' . $registrationEmail;
     $paramArray = array('registrantName' => $user->getFullName(), 'conferenceName' => $conferenceName, 'schedConfName' => $schedConfName, 'registrationType' => $registrationType->getSummaryString(), 'expiryDate' => $registration->getDateEnd(), 'username' => $user->getUsername(), 'registrationContactSignature' => $registrationContactSignature);
     import('mail.MailTemplate');
     $mail = new MailTemplate($emailKey, $conference->getPrimaryLocale());
     $mail->setFrom($registrationEmail, $registrationName);
     $mail->addRecipient($user->getEmail(), $user->getFullName());
     $mail->setSubject($mail->getSubject($conference->getPrimaryLocale()));
     $mail->setBody($mail->getBody($conference->getPrimaryLocale()));
     $mail->assignParams($paramArray);
     $mail->send();
 }
开发者ID:sedici,项目名称:ocs,代码行数:37,代码来源:RegistrationExpiryReminder.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($subclass = false)
 {
     $templateMgr =& TemplateManager::getManager();
     $pageCrumbs = array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'editor'), 'user.role.editor'));
     if ($subclass) {
         $returnPage = Request::getUserVar('returnPage');
         if ($returnPage != null) {
             $validPages =& $this->getValidReturnPages();
             if (!in_array($returnPage, $validPages)) {
                 $returnPage = null;
             }
         }
         $pageCrumbs[] = array(Request::url(null, 'editor', 'booksForReview', $returnPage), AppLocale::Translate('plugins.generic.booksForReview.displayName'), true);
     }
     $templateMgr->assign('pageHierarchy', $pageCrumbs);
     $bfrPlugin =& PluginRegistry::getPlugin('generic', BOOKS_FOR_REVIEW_PLUGIN_NAME);
     $templateMgr->addStyleSheet(Request::getBaseUrl() . '/' . $bfrPlugin->getStyleSheet());
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:22,代码来源:BooksForReviewEditorHandler.inc.php

示例12: getDurationYearsMonths

 /**
  * Get registration type duration in years and months.
  * @return string
  */
 function getDurationYearsMonths()
 {
     $years = (int) floor($this->getData('duration') / 12);
     $months = (int) fmod($this->getData('duration'), 12);
     $yearsMonths = '';
     if ($years == 1) {
         $yearsMonths = '1 ' . AppLocale::Translate('manager.registrationTypes.year');
     } elseif ($years > 1) {
         $yearsMonths = $years . ' ' . AppLocale::Translate('manager.registrationTypes.years');
     }
     if ($months == 1) {
         $yearsMonths .= $yearsMonths == '' ? '1 ' : ' 1 ';
         $yearsMonths .= AppLocale::Translate('manager.registrationTypes.month');
     } elseif ($months > 1) {
         $yearsMonths .= $yearsMonths == '' ? $months . ' ' : ' ' . $months . ' ';
         $yearsMonths .= AppLocale::Translate('manager.registrationTypes.months');
     }
     return $yearsMonths;
 }
开发者ID:artkuo,项目名称:ocs,代码行数:23,代码来源:RegistrationType.inc.php

示例13: display

 /**
  * Display the form.
  */
 function display()
 {
     $journal =& Request::getJournal();
     $settingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
     $roleDao =& DAORegistry::getDAO('RoleDAO');
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     AppLocale::requireComponents(LOCALE_COMPONENT_OJS_EDITOR);
     // editor.cover.xxx locale keys; FIXME?
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('articleId', isset($this->article) ? $this->article->getId() : null);
     $templateMgr->assign('journalSettings', $settingsDao->getJournalSettings($journal->getId()));
     $templateMgr->assign('rolePath', Request::getRequestedPage());
     $templateMgr->assign('canViewAuthors', $this->canViewAuthors);
     $countryDao =& DAORegistry::getDAO('CountryDAO');
     $templateMgr->assign('countries', $countryDao->getCountries());
     $templateMgr->assign('helpTopicId', 'submission.indexingAndMetadata');
     if ($this->article) {
         $templateMgr->assign_by_ref('section', $sectionDao->getSection($this->article->getSectionId()));
     }
     if ($this->isEditor) {
         import('classes.article.Article');
         $hideAuthorOptions = array(AUTHOR_TOC_DEFAULT => AppLocale::Translate('editor.article.hideTocAuthorDefault'), AUTHOR_TOC_HIDE => AppLocale::Translate('editor.article.hideTocAuthorHide'), AUTHOR_TOC_SHOW => AppLocale::Translate('editor.article.hideTocAuthorShow'));
         $templateMgr->assign('hideAuthorOptions', $hideAuthorOptions);
         $templateMgr->assign('isEditor', true);
     }
     // consider public identifiers
     $pubIdPlugins =& PluginRegistry::loadCategory('pubIds', true);
     $templateMgr->assign('pubIdPlugins', $pubIdPlugins);
     $templateMgr->assign_by_ref('article', $this->article);
     parent::display();
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:34,代码来源:MetadataForm.inc.php

示例14: issueToc

 /**
  * Display the table of contents
  */
 function issueToc($args, $request)
 {
     $issueId = (int) array_shift($args);
     $this->validate($issueId, true);
     $issue =& $this->issue;
     $this->setupTemplate(EDITOR_SECTION_ISSUES);
     $templateMgr =& TemplateManager::getManager();
     $journal =& $request->getJournal();
     $journalId = $journal->getId();
     $journalSettingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     $enablePublicArticleId = $journalSettingsDao->getSetting($journalId, 'enablePublicArticleId');
     $templateMgr->assign('enablePublicArticleId', $enablePublicArticleId);
     $enablePageNumber = $journalSettingsDao->getSetting($journalId, 'enablePageNumber');
     $templateMgr->assign('enablePageNumber', $enablePageNumber);
     $templateMgr->assign('customSectionOrderingExists', $customSectionOrderingExists = $sectionDao->customSectionOrderingExists($issueId));
     $templateMgr->assign('issueId', $issueId);
     $templateMgr->assign_by_ref('issue', $issue);
     $templateMgr->assign('unpublished', !$issue->getPublished());
     $templateMgr->assign('issueAccess', $issue->getAccessStatus());
     // get issue sections and articles
     $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticles = $publishedArticleDao->getPublishedArticles($issueId);
     $layoutEditorSubmissionDao =& DAORegistry::getDAO('LayoutEditorSubmissionDAO');
     $proofedArticleIds = $layoutEditorSubmissionDao->getProofedArticlesByIssueId($issueId);
     $templateMgr->assign('proofedArticleIds', $proofedArticleIds);
     $currSection = 0;
     $counter = 0;
     $sections = array();
     $sectionCount = 0;
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     foreach ($publishedArticles as $article) {
         $sectionId = $article->getSectionId();
         if ($currSection != $sectionId) {
             $lastSectionId = $currSection;
             $sectionCount++;
             if ($lastSectionId !== 0) {
                 $sections[$lastSectionId][5] = $customSectionOrderingExists ? $sectionDao->getCustomSectionOrder($issueId, $sectionId) : $sectionCount;
             }
             // Store next custom order
             $currSection = $sectionId;
             $counter++;
             $sections[$sectionId] = array($sectionId, $article->getSectionTitle(), array($article), $counter, $customSectionOrderingExists ? $sectionDao->getCustomSectionOrder($issueId, $lastSectionId) : $sectionCount - 1, null);
         } else {
             $sections[$article->getSectionId()][2][] = $article;
         }
     }
     $templateMgr->assign_by_ref('sections', $sections);
     $templateMgr->assign('accessOptions', array(ARTICLE_ACCESS_ISSUE_DEFAULT => AppLocale::Translate('editor.issues.default'), ARTICLE_ACCESS_OPEN => AppLocale::Translate('editor.issues.open')));
     import('classes.issue.IssueAction');
     $templateMgr->assign('issueOptions', IssueAction::getIssueOptions());
     $templateMgr->assign('helpTopicId', 'publishing.tableOfContents');
     $templateMgr->addJavaScript('lib/pkp/js/lib/jquery/plugins/jquery.tablednd.js');
     $templateMgr->addJavaScript('lib/pkp/js/functions/tablednd.js');
     $templateMgr->display('editor/issues/issueToc.tpl');
 }
开发者ID:reconciler,项目名称:ojs,代码行数:59,代码来源:IssueManagementHandler.inc.php

示例15: submissions

 /**
  * Display director submission queue pages.
  */
 function submissions($args)
 {
     $this->validate();
     $this->setupTemplate(DIRECTOR_TRACK_SUBMISSIONS);
     $schedConf =& Request::getSchedConf();
     $schedConfId = $schedConf->getId();
     $user =& Request::getUser();
     $directorSubmissionDao =& DAORegistry::getDAO('DirectorSubmissionDAO');
     $trackDao =& DAORegistry::getDAO('TrackDAO');
     $page = isset($args[0]) ? $args[0] : '';
     $tracks =& $trackDao->getTrackTitles($schedConfId);
     $filterDirectorOptions = array(FILTER_DIRECTOR_ALL => AppLocale::Translate('director.allDirectors'), FILTER_DIRECTOR_ME => AppLocale::Translate('director.me'));
     $filterTrackOptions = array(FILTER_TRACK_ALL => AppLocale::Translate('director.allTracks')) + $tracks;
     // Get the user's search conditions, if any
     $searchField = Request::getUserVar('searchField');
     $searchMatch = Request::getUserVar('searchMatch');
     $search = Request::getUserVar('search');
     $sort = Request::getUserVar('sort');
     $sortDirection = Request::getUserVar('sortDirection');
     switch ($page) {
         case 'submissionsUnassigned':
             $functionName = 'getDirectorSubmissionsUnassigned';
             $helpTopicId = 'editorial.directorsRole.submissions.unassigned';
             $sort = isset($sort) ? $sort : 'id';
             break;
         case 'submissionsAccepted':
             $functionName = 'getDirectorSubmissionsAccepted';
             $helpTopicId = 'editorial.directorsRole.submissions.presentations';
             $sort = isset($sort) ? $sort : 'seq';
             break;
         case 'submissionsArchives':
             $functionName = 'getDirectorSubmissionsArchives';
             $helpTopicId = 'editorial.directorsRole.submissions.archives';
             $sort = isset($sort) ? $sort : 'id';
             break;
         default:
             $page = 'submissionsInReview';
             $functionName = 'getDirectorSubmissionsInReview';
             $helpTopicId = 'editorial.directorsRole.submissions.inReview';
             $sort = isset($sort) ? $sort : 'id';
     }
     $filterDirector = Request::getUserVar('filterDirector');
     if ($filterDirector != '' && array_key_exists($filterDirector, $filterDirectorOptions)) {
         $user->updateSetting('filterDirector', $filterDirector, 'int', $schedConfId);
     } else {
         $filterDirector = $user->getSetting('filterDirector', $schedConfId);
         if ($filterDirector == null) {
             $filterDirector = FILTER_DIRECTOR_ALL;
             $user->updateSetting('filterDirector', $filterDirector, 'int', $schedConfId);
         }
     }
     if ($filterDirector == FILTER_DIRECTOR_ME) {
         $directorId = $user->getId();
     } else {
         $directorId = FILTER_DIRECTOR_ALL;
     }
     $filterTrack = Request::getUserVar('filterTrack');
     if ($filterTrack != '' && array_key_exists($filterTrack, $filterTrackOptions)) {
         $user->updateSetting('filterTrack', $filterTrack, 'int', $schedConfId);
     } else {
         $filterTrack = $user->getSetting('filterTrack', $schedConfId);
         if ($filterTrack == null) {
             $filterTrack = FILTER_TRACK_ALL;
             $user->updateSetting('filterTrack', $filterTrack, 'int', $schedConfId);
         }
     }
     $rangeInfo =& Handler::getRangeInfo('submissions', array($functionName, (string) $searchField, (string) $searchMatch, (string) $search));
     while (true) {
         $submissions =& $directorSubmissionDao->{$functionName}($schedConfId, $filterTrack, $directorId, $searchField, $searchMatch, $search, null, null, null, $rangeInfo, $sort, $sortDirection);
         if ($submissions->isInBounds()) {
             break;
         }
         unset($rangeInfo);
         $rangeInfo =& $submissions->getLastPageRangeInfo();
         unset($submissions);
     }
     if ($sort == 'status') {
         // Sort all submissions by status, which is too complex to do in the DB
         $submissionsArray = $submissions->toArray();
         $compare = create_function('$s1, $s2', 'return strcmp($s1->getSubmissionStatus(), $s2->getSubmissionStatus());');
         usort($submissionsArray, $compare);
         if ($sortDirection == 'DESC') {
             $submissionsArray = array_reverse($submissionsArray);
         }
         // Convert submission array back to an ItemIterator class
         import('core.ArrayItemIterator');
         $submissions =& ArrayItemIterator::fromRangeInfo($submissionsArray, $rangeInfo);
     }
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('pageToDisplay', $page);
     $templateMgr->assign('director', $user->getFullName());
     $templateMgr->assign('directorOptions', $filterDirectorOptions);
     $templateMgr->assign('trackOptions', $filterTrackOptions);
     $templateMgr->assign_by_ref('submissions', $submissions);
     $templateMgr->assign('filterDirector', $filterDirector);
     $templateMgr->assign('filterTrack', $filterTrack);
     $templateMgr->assign('yearOffsetFuture', SCHED_CONF_DATE_YEAR_OFFSET_FUTURE);
//.........这里部分代码省略.........
开发者ID:sedici,项目名称:ocs,代码行数:101,代码来源:DirectorHandler.inc.php


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