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


PHP AppLocale::requireComponents方法代码示例

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


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

示例1: 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);
     $this->_oldUserId = (int) $request->getUserVar('oldUserId');
     // Basic grid configuration.
     $this->setTitle('grid.user.currentUsers');
     // Grid actions.
     $router = $request->getRouter();
     import('lib.pkp.classes.linkAction.request.AjaxModal');
     $this->addAction(new LinkAction('addUser', new AjaxModal($router->url($request, null, null, 'addUser', null, null), __('grid.user.add'), 'modal_add_user', true), __('grid.user.add'), 'add_user'));
     //
     // Grid columns.
     //
     // First Name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('firstName', 'user.firstName', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     // Last Name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('lastName', 'user.lastName', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     // User name.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('username', 'user.username', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     // Email.
     $cellProvider = new DataObjectGridCellProvider();
     $this->addColumn(new GridColumn('email', 'user.email', null, 'controllers/grid/gridCell.tpl', $cellProvider));
 }
开发者ID:doana,项目名称:pkp-lib,代码行数:31,代码来源:UserGridHandler.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: 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

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

示例6: fetchRepresentation

 /**
  * Display the publication format template (grid + actions).
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function fetchRepresentation($args, $request)
 {
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_APP_EDITOR);
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->assign(array('submission' => $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION), 'stageId' => $this->getAuthorizedContextObject(ASSOC_TYPE_WORKFLOW_STAGE), 'representation' => $this->getAuthorizedContextObject(ASSOC_TYPE_REPRESENTATION)));
     return $templateMgr->fetchJson('controllers/tab/workflow/publicationFormat.tpl');
 }
开发者ID:NateWr,项目名称:omp,代码行数:13,代码来源:PublicationFormatHandler.inc.php

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

示例8: initialize

 /**
  * @copydoc GridHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Load language components
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_APP_MANAGER);
     // Basic grid configuration
     $this->setTitle('common.plugins');
     // Set the no items row text
     $this->setEmptyRowText('grid.noItems');
     // Columns
     import('lib.pkp.controllers.grid.plugins.PluginGridCellProvider');
     $pluginCellProvider = new PluginGridCellProvider();
     $this->addColumn(new GridColumn('name', 'common.name', null, null, $pluginCellProvider, array('multiline' => true, 'showTotalItemsNumber' => true, 'collapseAllColumnsInCategories' => true)));
     $descriptionColumn = new GridColumn('description', 'common.description', null, null, $pluginCellProvider);
     $descriptionColumn->addFlag('html', true);
     $this->addColumn($descriptionColumn);
     $this->addColumn(new GridColumn('enabled', 'common.enabled', null, 'controllers/grid/common/cell/selectStatusCell.tpl', $pluginCellProvider));
     $router = $request->getRouter();
     // Grid level actions.
     $userRoles = $this->getAuthorizedContextObject(ASSOC_TYPE_USER_ROLES);
     if (in_array(ROLE_ID_SITE_ADMIN, $userRoles)) {
         import('lib.pkp.classes.linkAction.request.AjaxModal');
         // Install plugin.
         $this->addAction(new LinkAction('upload', new AjaxModal($router->url($request, null, null, 'uploadPlugin'), __('manager.plugins.upload'), 'modal_add_file'), __('manager.plugins.upload'), 'add'));
     }
 }
开发者ID:piero-tasso,项目名称:pkp-lib,代码行数:29,代码来源:PluginGridHandler.inc.php

示例9: getReportObjectTypesArray

 /**
  * @see PKPStatisticsHelper::getReportObjectTypesArray()
  */
 protected function getReportObjectTypesArray()
 {
     $objectTypes = parent::getReportObjectTypesArray();
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_EDITOR);
     $objectTypes = $objectTypes + array(ASSOC_TYPE_JOURNAL => __('context.context'), ASSOC_TYPE_SECTION => __('section.section'), ASSOC_TYPE_ISSUE => __('issue.issue'), ASSOC_TYPE_ISSUE_GALLEY => __('editor.issues.galley'), ASSOC_TYPE_ARTICLE => __('article.article'), ASSOC_TYPE_SUBMISSION_FILE => __('submission.galleyFiles'));
     return $objectTypes;
 }
开发者ID:chrisgreencorn,项目名称:ojs,代码行数:10,代码来源:StatisticsHelper.inc.php

示例10: initialize

 /**
  * @copydoc SettingsTabHandler::initialize()
  */
 function initialize($request, $args = null)
 {
     $this->setWizardMode($request->getUserVar('wizardMode'));
     parent::initialize($request, $args);
     // Load handler specific translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_APP_MANAGER, LOCALE_COMPONENT_PKP_GRID);
 }
开发者ID:doana,项目名称:pkp-lib,代码行数:10,代码来源:ManagerSettingsTabHandler.inc.php

示例11: PKPManageFileApiHandler

 /**
  * Constructor.
  */
 function PKPManageFileApiHandler()
 {
     parent::Handler();
     $this->addRoleAssignment(array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR, ROLE_ID_ASSISTANT, ROLE_ID_REVIEWER, ROLE_ID_AUTHOR), array('deleteFile', 'editMetadata', 'editMetadataTab', 'saveMetadata'));
     // Load submission-specific translations
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION);
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:10,代码来源:PKPManageFileApiHandler.inc.php

示例12: initialize

 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Load submission-specific translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION);
     // Fetch the authorized roles and determine if the user is a manager.
     $authorizedRoles = $this->getAuthorizedContextObject(ASSOC_TYPE_USER_ROLES);
     $this->_isManager = in_array(ROLE_ID_MANAGER, $authorizedRoles);
     // If there is more than one context in the system, add a context column
     $contextDao = Application::getContextDAO();
     $contexts = $contextDao->getAll();
     $cellProvider = new SubmissionsListGridCellProvider($authorizedRoles);
     if ($contexts->getCount() > 1) {
         $hasRoleCount = 0;
         $userGroupDao = DAORegistry::getDAO('UserGroupDAO');
         $user = $request->getUser();
         while ($context = $contexts->next()) {
             $userGroups = $userGroupDao->getByUserId($user->getId(), $context->getId());
             if ($userGroups->getCount() > 0) {
                 $hasRoleCount++;
             }
         }
         if ($hasRoleCount > 1 || $request->getContext() == null) {
             $this->addColumn(new GridColumn('context', 'context.context', null, null, $cellProvider));
         }
     }
     $this->addColumn(new GridColumn('id', null, __('common.id'), 'controllers/grid/gridCell.tpl', $cellProvider, array('alignment' => COLUMN_ALIGNMENT_LEFT, 'width' => 10)));
     $this->addColumn(new GridColumn('title', 'submission.title', null, null, $cellProvider, array('html' => true, 'alignment' => COLUMN_ALIGNMENT_LEFT)));
     $this->addColumn(new GridColumn('stage', 'workflow.stage', null, null, $cellProvider, array('alignment' => COLUMN_ALIGNMENT_LEFT, 'width' => 15)));
 }
开发者ID:jack-cade-inc,项目名称:pkp-lib,代码行数:33,代码来源:SubmissionsListGridHandler.inc.php

示例13: initialize

 /**
  * Configure the grid
  * @param PKPRequest $request
  */
 function initialize($request)
 {
     parent::initialize($request);
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_EDITOR);
     $this->setTitle('submission.files');
     $this->_chapterId = $request->getUserVar('chapterId');
 }
开发者ID:josekarvalho,项目名称:omp,代码行数:11,代码来源:ChapterFilesListbuilderHandler.inc.php

示例14: extractMetadataFromDataObject

 /**
  * @see MetadataDataObjectAdapter::extractMetadataFromDataObject()
  * @param $monograph Monograph
  * @return MetadataDescription
  */
 function extractMetadataFromDataObject($monograph)
 {
     assert(is_a($monograph, 'Monograph'));
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON);
     // Retrieve data that belongs to the publication format.
     $oaiDao = DAORegistry::getDAO('OAIDAO');
     /* @var $oaiDao OAIDAO */
     $publishedMonographDao = DAORegistry::getDAO('PublishedMonographDAO');
     $chapterDao = DAORegistry::getDAO('ChapterDAO');
     $monograph = $publishedMonographDao->getById($monograph->getId());
     $press = $oaiDao->getPress($monograph->getPressId());
     $description = $this->instantiateMetadataDescription();
     // Update status
     // Is communicated via an attribute, so property value is empty
     $description->addStatement('administrative_data/delivery/update_status[@type="urn_new"]', "");
     $urn = "";
     $scheme = "";
     $pubIdPlugins = PluginRegistry::loadCategory('pubIds');
     if (isset($pubIdPlugins) && array_key_exists('URNDNBPubIdPlugin', $pubIdPlugins) && $pubIdPlugins['URNDNBPubIdPlugin']->getEnabled() == true) {
         $urn = $pubIdPlugins['URNDNBPubIdPlugin']->getPubId($monograph);
         $namespaces = explode(':', $urn);
         $numberOfNamespaces = min(sizeof($namespaces), 3);
         $scheme = implode(":", array_slice($namespaces, 0, $numberOfNamespaces));
     }
     // URN
     $description->addStatement('record/identifier', $urn . ' [@scheme="' . $scheme . '"]');
     // URL
     $url = Request::url($press->getPath(), 'catalog', 'book', array($monograph->getId()));
     $description->addStatement('record/resource/identifier[@scheme="url", @type="frontpage", @role="primary"]', $url);
     // URL Mime type
     $description->addStatement('record/resource/format[@scheme="imt"]', "text/html");
     return $description;
 }
开发者ID:kadowa,项目名称:omp-xepicur-metadata-plugin,代码行数:38,代码来源:Epc10SchemaMonographAdapter.inc.php

示例15: initialize

 function initialize($request)
 {
     parent::initialize($request);
     // Add locale keys
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION);
     // Basic configuration
     $this->setTitle('submission.submit.addAuthor');
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT);
     $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL);
     $this->setSaveFieldName('authors');
     // Fetch and authorize chapter
     $chapterDao = DAORegistry::getDAO('ChapterDAO');
     $monograph = $this->getMonograph();
     $chapter = $chapterDao->getChapter($request->getUserVar('chapterId'), $monograph->getId());
     if ($chapter) {
         // This is an existing chapter
         $this->setChapterId($chapter->getId());
     } else {
         // This is a new chapter
         $this->setChapterId(null);
     }
     // Name column
     $nameColumn = new ListbuilderGridColumn($this, 'name', 'common.name');
     // We can reuse the User cell provider because getFullName
     import('lib.pkp.controllers.listbuilder.users.UserListbuilderGridCellProvider');
     $nameColumn->setCellProvider(new UserListbuilderGridCellProvider());
     $this->addColumn($nameColumn);
 }
开发者ID:NateWr,项目名称:omp,代码行数:28,代码来源:ChapterAuthorListbuilderHandler.inc.php


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