• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP AppLocale类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: initialize

 /**
  * @see PKPHandler::initialize()
  */
 function initialize($request)
 {
     // Load user-related translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_ADMIN, LOCALE_COMPONENT_APP_MANAGER, LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_GRID, LOCALE_COMPONENT_PKP_MANAGER);
     // Basic grid configuration.
     $this->setTitle('manager.reviewForms');
     // Grid actions.
     $router = $request->getRouter();
     import('lib.pkp.classes.linkAction.request.AjaxModal');
     $this->addAction(new LinkAction('createReviewForm', new AjaxModal($router->url($request, null, null, 'createReviewForm', null, null), __('manager.reviewForms.create'), 'modal_add_item', true), __('manager.reviewForms.create'), 'add_item'));
     //
     // Grid columns.
     //
     import('lib.pkp.controllers.grid.settings.reviewForms.ReviewFormGridCellProvider');
     $reviewFormGridCellProvider = new ReviewFormGridCellProvider();
     // Review form name.
     $this->addColumn(new GridColumn('name', 'manager.reviewForms.title', null, null, $reviewFormGridCellProvider));
     // Review Form 'in review'
     $this->addColumn(new GridColumn('inReview', 'manager.reviewForms.inReview', null, null, $reviewFormGridCellProvider));
     // Review Form 'completed'.
     $this->addColumn(new GridColumn('completed', 'manager.reviewForms.completed', null, null, $reviewFormGridCellProvider));
     // Review form 'activate/deactivate'
     // if ($element->getActive()) {
     $this->addColumn(new GridColumn('active', 'common.active', null, 'controllers/grid/common/cell/selectStatusCell.tpl', $reviewFormGridCellProvider));
 }
开发者ID:jack-cade-inc,项目名称:pkp-lib,代码行数:28,代码来源:ReviewFormGridHandler.inc.php


示例2: initialize

 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Load user-related translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_APP_MANAGER);
     // Basic grid configuration.
     $this->setTitle('grid.user.currentUsers');
     // Grid actions.
     $router = $request->getRouter();
     $pluginName = $request->getUserVar('pluginName');
     assert(!empty($pluginName));
     $this->_pluginName = $pluginName;
     $dispatcher = $request->getDispatcher();
     $url = $dispatcher->url($request, ROUTE_PAGE, null, 'manager', 'importexport', array('plugin', $pluginName, 'exportAllUsers'));
     $this->addAction(new LinkAction('exportAllUsers', new RedirectConfirmationModal(__('grid.users.confirmExportAllUsers'), null, $url), __('grid.action.exportAllUsers'), 'export_users'));
     //
     // Grid columns.
     //
     // First Name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('firstName', 'user.firstName', null, null, $cellProvider));
     // Last Name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('lastName', 'user.lastName', null, null, $cellProvider));
     // User name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('username', 'user.username', null, null, $cellProvider));
     // Email.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('email', 'user.email', null, null, $cellProvider));
 }
开发者ID:relaciones-internacionales-journal,项目名称:pkp-lib,代码行数:34,代码来源:ExportableUsersGridHandler.inc.php


示例3: startWizard

 /**
  * Displays the context settings wizard.
  * @param $args array
  * @param $request Request
  * @return JSONMessage JSON object
  */
 function startWizard($args, $request)
 {
     $templateMgr = TemplateManager::getManager($request);
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_MANAGER, LOCALE_COMPONENT_PKP_MANAGER);
     $this->setupTemplate($request);
     return $templateMgr->fetchJson('controllers/wizard/settings/settingsWizard.tpl');
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:13,代码来源:ContextSettingsWizardHandler.inc.php


示例4: initialize

 /**
  * @copydoc SetupListbuilderHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER);
     $footerCategoryId = (int) $request->getUserVar('footerCategoryId');
     $context = $request->getContext();
     $footerCategoryDao = DAORegistry::getDAO('FooterCategoryDAO');
     $footerCategory = $footerCategoryDao->getById($footerCategoryId, $context->getId());
     if ($footerCategoryId && !isset($footerCategory)) {
         fatalError('Footer Category does not exist within this context.');
     } else {
         $this->_footerCategoryId = $footerCategoryId;
     }
     // Basic configuration
     $this->setTitle('grid.content.navigation.footer.FooterLink');
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_TEXT);
     $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL);
     $this->setSaveFieldName('footerLinks');
     import('lib.pkp.controllers.listbuilder.content.navigation.FooterLinkListbuilderGridCellProvider');
     // Title column
     $titleColumn = new MultilingualListbuilderGridColumn($this, 'title', 'common.title', null, null, null, null, array('tabIndex' => 1));
     $titleColumn->setCellProvider(new FooterLinkListbuilderGridCellProvider());
     $this->addColumn($titleColumn);
     // Url column
     $urlColumn = new MultilingualListbuilderGridColumn($this, 'url', 'common.url', null, null, null, null, array('tabIndex' => 2));
     $urlColumn->setCellProvider(new FooterLinkListbuilderGridCellProvider());
     $this->addColumn($urlColumn);
 }
开发者ID:mczirfusz,项目名称:pkp-lib,代码行数:31,代码来源:FooterLinkListbuilderHandler.inc.php


示例5: _assignTemplateCounterXML

 /**
  * Internal function to assign information for the Counter part of a report
  */
 function _assignTemplateCounterXML($templateManager, $begin, $end = '')
 {
     $journal =& Request::getJournal();
     $counterReportDao =& DAORegistry::getDAO('CounterReportDAO');
     $journalDao =& DAORegistry::getDAO('JournalDAO');
     $journalIds = $counterReportDao->getJournalIds();
     if ($end == '') {
         $end = $begin;
     }
     $i = 0;
     foreach ($journalIds as $journalId) {
         $journal =& $journalDao->getById($journalId);
         if (!$journal) {
             continue;
         }
         $entries = $counterReportDao->getMonthlyLogRange($journalId, $begin, $end);
         $journalsArray[$i]['entries'] = $this->_arrangeEntries($entries, $begin, $end);
         $journalsArray[$i]['journalTitle'] = $journal->getLocalizedTitle();
         $journalsArray[$i]['publisherInstitution'] = $journal->getSetting('publisherInstitution');
         $journalsArray[$i]['printIssn'] = $journal->getSetting('printIssn');
         $journalsArray[$i]['onlineIssn'] = $journal->getSetting('onlineIssn');
         $i++;
     }
     $siteSettingsDao =& DAORegistry::getDAO('SiteSettingsDAO');
     $siteTitle = $siteSettingsDao->getSetting('title', AppLocale::getLocale());
     $base_url =& Config::getVar('general', 'base_url');
     $reqUser =& Request::getUser();
     $templateManager->assign_by_ref('reqUser', $reqUser);
     $templateManager->assign_by_ref('journalsArray', $journalsArray);
     $templateManager->assign('siteTitle', $siteTitle);
     $templateManager->assign('base_url', $base_url);
 }
开发者ID:alexukua,项目名称:j2test,代码行数:35,代码来源:CounterHandler.inc.php


示例6: FileLoader

 /**
  * Constructor.
  * @param $args array script arguments
  */
 function FileLoader($args)
 {
     parent::ScheduledTask($args);
     // Set an initial process id and load translations (required
     // for email notifications).
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_ADMIN);
     $this->_newProcessId();
     // Canonicalize the base path.
     $basePath = rtrim($args[0], DIRECTORY_SEPARATOR);
     $basePathFolder = basename($basePath);
     // We assume that the parent folder of the base path
     // does already exist and can be canonicalized.
     $basePathParent = realpath(dirname($basePath));
     if ($basePathParent === false) {
         $basePath = null;
     } else {
         $basePath = $basePathParent . DIRECTORY_SEPARATOR . $basePathFolder;
     }
     $this->_basePath = $basePath;
     // Configure paths.
     if (!is_null($basePath)) {
         $this->_stagePath = $basePath . DIRECTORY_SEPARATOR . FILE_LOADER_PATH_STAGING;
         $this->_archivePath = $basePath . DIRECTORY_SEPARATOR . FILE_LOADER_PATH_ARCHIVE;
         $this->_rejectPath = $basePath . DIRECTORY_SEPARATOR . FILE_LOADER_PATH_REJECT;
         $this->_processingPath = $basePath . DIRECTORY_SEPARATOR . FILE_LOADER_PATH_PROCESSING;
     }
     // Set admin email and name.
     $siteDao = DAORegistry::getDAO('SiteDAO');
     /* @var $siteDao SiteDAO */
     $site = $siteDao->getSite();
     /* @var $site Site */
     $this->_adminEmail = $site->getLocalizedContactEmail();
     $this->_adminName = $site->getLocalizedContactName();
 }
开发者ID:doana,项目名称:pkp-lib,代码行数:38,代码来源:FileLoader.inc.php


示例7: getWorkflowStageTranslationKeys

 /**
  * Return a mapping of workflow stages and its translation keys.
  * @return array
  */
 static function getWorkflowStageTranslationKeys()
 {
     $applicationStages = Application::getApplicationStages();
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_APP_SUBMISSION);
     static $stageMapping = array(WORKFLOW_STAGE_ID_SUBMISSION => 'submission.submission', WORKFLOW_STAGE_ID_INTERNAL_REVIEW => 'workflow.review.internalReview', WORKFLOW_STAGE_ID_EXTERNAL_REVIEW => 'workflow.review.externalReview', WORKFLOW_STAGE_ID_EDITING => 'submission.editorial', WORKFLOW_STAGE_ID_PRODUCTION => 'submission.production');
     return array_intersect_key($stageMapping, array_flip($applicationStages));
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:11,代码来源:WorkflowStageDAO.inc.php


示例8: _cacheMiss

 /**
  * Handle a cache miss
  * @param $cache GenericCache
  * @param $id mixed ID that wasn't found in the cache
  * @return null
  */
 function _cacheMiss($cache, $id)
 {
     $allCodelistItems =& Registry::get('all' . $this->getName() . 'CodelistItems', true, null);
     if ($allCodelistItems === null) {
         // Add a locale load to the debug notes.
         $notes =& Registry::get('system.debug.notes');
         $locale = $cache->cacheId;
         if ($locale == null) {
             $locale = AppLocale::getLocale();
         }
         $filename = $this->getFilename($locale);
         $notes[] = array('debug.notes.codelistItemListLoad', array('filename' => $filename));
         // Reload locale registry file
         $xmlDao = new XMLDAO();
         $nodeName = $this->getName();
         // i.e., subject
         $data = $xmlDao->parseStruct($filename, array($nodeName));
         // Build array with ($charKey => array(stuff))
         if (isset($data[$nodeName])) {
             foreach ($data[$nodeName] as $codelistData) {
                 $allCodelistItems[$codelistData['attributes']['code']] = array($codelistData['attributes']['text']);
             }
         }
         if (is_array($allCodelistItems)) {
             asort($allCodelistItems);
         }
         $cache->setEntireCache($allCodelistItems);
     }
     return null;
 }
开发者ID:PublishingWithoutWalls,项目名称:omp,代码行数:36,代码来源:CodelistItemDAO.inc.php


示例9: 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


示例10: getSubscriptionTypeName

 /**
  * Retrieve subscription type name by ID.
  * @param $typeId int
  * @return string
  */
 function getSubscriptionTypeName($typeId)
 {
     $result = $this->retrieve('SELECT COALESCE(l.setting_value, p.setting_value) FROM subscription_type_settings l LEFT JOIN subscription_type_settings p ON (p.type_id = ? AND p.setting_name = ? AND p.locale = ?) WHERE l.type_id = ? AND l.setting_name = ? AND l.locale = ?', array($typeId, 'name', AppLocale::getLocale(), $typeId, 'name', AppLocale::getPrimaryLocale()));
     $returner = isset($result->fields[0]) ? $result->fields[0] : false;
     $result->Close();
     return $returner;
 }
开发者ID:laelnasan,项目名称:UTFPR-ojs,代码行数:12,代码来源:SubscriptionTypeDAO.inc.php


示例11: 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


示例12:

 /**
  * @see Filter::process()
  */
 function &process(&$input)
 {
     // Initialize view
     $locale = AppLocale::getLocale();
     $application = PKPApplication::getApplication();
     $request = $application->getRequest();
     $templateMgr = TemplateManager::getManager($request);
     // Add the filter's directory as additional template dir so that
     // templates can include sub-templates in the same folder.
     array_unshift($templateMgr->template_dir, $this->getBasePath());
     // Give sub-filters a chance to add their variables
     // to the template.
     $this->addTemplateVars($templateMgr, $input, $request, $locale);
     // Use a base path hash as compile id to make sure that we don't
     // get namespace problems if several filters use the same
     // template names.
     $previousCompileId = $templateMgr->compile_id;
     $templateMgr->compile_id = md5($this->getBasePath());
     // Let the template engine render the citation.
     $output = $templateMgr->fetch($this->getTemplateName());
     // Remove the additional template dir
     array_shift($templateMgr->template_dir);
     // Restore the compile id.
     $templateMgr->compile_id = $previousCompileId;
     return $output;
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:29,代码来源:TemplateBasedFilter.inc.php


示例13: fetch

 /**
  * @copydoc ContextSettingsForm::fetch
  */
 function fetch($request, $params = null)
 {
     $templateMgr = TemplateManager::getManager($request);
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION);
     $templateMgr->assign('ccLicenseOptions', array_merge(array('' => 'common.other'), Application::getCCLicenseOptions()));
     return parent::fetch($request, $params);
 }
开发者ID:selwyntcy,项目名称:pkp-lib,代码行数:10,代码来源:PermissionSettingsForm.inc.php


示例14: validate

 /**
  * Check to make sure form conditions are met
  */
 function validate()
 {
     // Ensure all submission types have names in the primary locale
     // as well as numeric word limits (optional)
     $primaryLocale = AppLocale::getPrimaryLocale();
     if (isset($this->_data['paperTypes'])) {
         $paperTypes =& $this->_data['paperTypes'];
         if (!is_array($paperTypes)) {
             return false;
         }
         foreach ($paperTypes as $paperTypeId => $paperType) {
             if (!isset($paperType['name'][$primaryLocale]) || empty($paperType['name'][$primaryLocale])) {
                 $fieldName = 'paperTypeName-' . $paperTypeId;
                 $this->addError($fieldName, __('manager.schedConfSetup.submissions.typeOfSubmission.nameMissing', array('primaryLocale' => $primaryLocale)));
                 $this->addErrorField($fieldName);
             }
             if (isset($paperType['abstractLength']) && !empty($paperType['abstractLength']) && (!is_numeric($paperType['abstractLength']) || $paperType['abstractLength'] <= 0)) {
                 $fieldName = 'paperTypeAbstractLength-' . $paperTypeId;
                 $this->addError($fieldName, __('manager.schedConfSetup.submissions.typeOfSubmission.abstractLengthInvalid'));
                 $this->addErrorField($fieldName);
             }
         }
     }
     return parent::validate();
 }
开发者ID:artkuo,项目名称:ocs,代码行数:28,代码来源:SchedConfSetupStep2Form.inc.php


示例15: array

 /**
  * Get a piece of data for this object, localized to the current
  * locale if possible.
  * @param $key string
  * @param $preferredLocale string
  * @return mixed
  */
 function &getLocalizedData($key, $preferredLocale = null)
 {
     if (is_null($preferredLocale)) {
         $preferredLocale = AppLocale::getLocale();
     }
     $localePrecedence = array($preferredLocale, $this->getLocale());
     foreach ($localePrecedence as $locale) {
         if (empty($locale)) {
             continue;
         }
         $value =& $this->getData($key, $locale);
         if (!empty($value)) {
             return $value;
         }
         unset($value);
     }
     // Fallback: Get the first available piece of data.
     $data =& $this->getData($key, null);
     if (!empty($data)) {
         return $data[array_shift(array_keys($data))];
     }
     // No data available; return null.
     unset($data);
     $data = null;
     return $data;
 }
开发者ID:yuricampos,项目名称:ojs,代码行数:33,代码来源:Submission.inc.php


示例16: getFilename

 /**
  * Get the filename of the qualifier database
  * @param $locale string
  * @return string
  */
 function getFilename($locale)
 {
     if (!AppLocale::isLocaleValid($locale)) {
         $locale = AppLocale::MASTER_LOCALE;
     }
     return "lib/pkp/locale/{$locale}/bic21qualifiers.xml";
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:12,代码来源:QualifierDAO.inc.php


示例17: SubmissionLibraryLinkAction

 /**
  * Constructor
  * @param $request Request
  * @param $submissionId int the ID of the submission to present link for
  * to show information about.
  */
 function SubmissionLibraryLinkAction($request, $submissionId)
 {
     $dispatcher = $request->getDispatcher();
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_EDITOR);
     import('lib.pkp.classes.linkAction.request.AjaxModal');
     parent::LinkAction('editorialHistory', new AjaxModal($dispatcher->url($request, ROUTE_COMPONENT, null, 'modals.documentLibrary.DocumentLibraryHandler', 'documentLibrary', null, array('submissionId' => $submissionId)), __('editor.submissionLibrary'), 'modal_information'), __('editor.submissionLibrary'), 'more_info');
 }
开发者ID:mczirfusz,项目名称:pkp-lib,代码行数:13,代码来源:SubmissionLibraryLinkAction.inc.php


示例18: initialize

 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     $context = $request->getContext();
     $this->_contextId = $context->getId();
     // Load user-related translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_APP_MANAGER, LOCALE_COMPONENT_PKP_SUBMISSION);
     // Basic grid configuration.
     $this->setTitle('grid.roles.currentRoles');
     // Add grid-level actions.
     $router = $request->getRouter();
     $this->addAction(new LinkAction('addUserGroup', new AjaxModal($router->url($request, null, null, 'addUserGroup'), __('grid.roles.add'), 'modal_add_role'), __('grid.roles.add'), 'add_role'));
     import('lib.pkp.controllers.grid.settings.roles.UserGroupGridCellProvider');
     $cellProvider = new UserGroupGridCellProvider();
     $workflowStagesLocales = WorkflowStageDAO::getWorkflowStageTranslationKeys();
     // Set array containing the columns info with the same cell provider.
     $columnsInfo = array(1 => array('id' => 'name', 'title' => 'settings.roles.roleName', 'template' => null), 2 => array('id' => 'abbrev', 'title' => 'settings.roles.roleAbbrev', 'template' => null));
     foreach ($workflowStagesLocales as $stageId => $stageTitleKey) {
         $columnsInfo[] = array('id' => $stageId, 'title' => $stageTitleKey, 'template' => 'controllers/grid/common/cell/selectStatusCell.tpl');
     }
     // Add array columns to the grid.
     foreach ($columnsInfo as $columnInfo) {
         $this->addColumn(new GridColumn($columnInfo['id'], $columnInfo['title'], null, $columnInfo['template'], $cellProvider));
     }
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:28,代码来源:UserGroupGridHandler.inc.php


示例19: execute

 /**
  * Execute the command
  */
 function execute()
 {
     $stderr = fopen('php://stdout', 'w');
     $locales = AppLocale::getAllLocales();
     $dbConn = DBConnection::getConn();
     foreach ($locales as $locale => $localeName) {
         fprintf($stderr, "Checking {$localeName}...\n");
         $oldTemplatesText = $this->fetchFileVersion('ojs', "locale/{$locale}/emailTemplates.xml", $this->oldTag);
         $newTemplatesText = $this->fetchFileVersion('ojs', "locale/{$locale}/emailTemplates.xml", $this->newTag);
         if ($oldTemplatesText === false || $newTemplatesText === false) {
             fprintf($stderr, "Skipping {$localeName}; could not fetch.\n");
             continue;
         }
         $oldEmails = $this->parseEmails($oldTemplatesText);
         $newEmails = $this->parseEmails($newTemplatesText);
         foreach ($oldEmails['email_text'] as $oi => $junk) {
             $key = $junk['attributes']['key'];
             $ni = null;
             foreach ($newEmails['email_text'] as $ni => $junk) {
                 if ($key == $junk['attributes']['key']) {
                     break;
                 }
             }
             if ($oldEmails['subject'][$oi]['value'] != $newEmails['subject'][$ni]['value']) {
                 echo "UPDATE email_templates_default_data SET subject='" . $dbConn->escape($newEmails['subject'][$ni]['value']) . "' WHERE key='" . $dbConn->escape($key) . "' AND locale='" . $dbConn->escape($locale) . "' AND subject='" . $dbConn->escape($oldEmails['subject'][$oi]['value']) . "';\n";
             }
             if ($oldEmails['body'][$oi]['value'] != $newEmails['body'][$ni]['value']) {
                 echo "UPDATE email_templates_default_data SET body='" . $dbConn->escape($newEmails['body'][$ni]['value']) . "' WHERE key='" . $dbConn->escape($key) . "' AND locale='" . $dbConn->escape($locale) . "' AND body='" . $dbConn->escape($oldEmails['body'][$oi]['value']) . "';\n";
             }
         }
     }
     fclose($stderr);
 }
开发者ID:laelnasan,项目名称:UTFPR-ojs,代码行数:36,代码来源:genEmailUpdates.php


示例20: fetch

 /**
  * Fetch the modal contents for the monograph selection form
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function fetch($args, $request)
 {
     $templateMgr = TemplateManager::getManager($request);
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_SUBMISSION);
     // submission.select
     return new JSONMessage(true, $templateMgr->fetch('controllers/modals/submissionMetadata/selectMonograph.tpl'));
 }
开发者ID:NateWr,项目名称:omp,代码行数:13,代码来源:SelectMonographHandler.inc.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP AppModel类代码示例发布时间:2022-05-23
下一篇:
PHP AppKernel类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap