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


PHP ListbuilderHandler::initialize方法代码示例

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


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

示例1: initialize

 /**
  * @copydoc SetupListbuilderHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     $context = $request->getContext();
     $this->setTitle('plugins.generic.translator.localeFileContents');
     $this->setInstructions('plugins.generic.translator.localeFileContentsDescription');
     // Get and validate the locale and filename parameters
     $this->locale = $request->getUserVar('locale');
     if (!AppLocale::isLocaleValid($this->locale)) {
         fatalError('Invalid locale.');
     }
     $this->filename = $request->getUserVar('filename');
     if (!in_array($this->filename, TranslatorAction::getLocaleFiles($this->locale))) {
         fatalError('Invalid locale file specified!');
     }
     // Basic configuration
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_TEXT);
     $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL);
     $this->setSaveFieldName('localeKeys');
     self::$plugin->import('controllers.listbuilder.LocaleFileListbuilderGridCellProvider');
     $cellProvider = new LocaleFileListbuilderGridCellProvider($this->locale);
     // Key column
     $this->addColumn(new ListbuilderGridColumn($this, 'key', 'plugins.generic.translator.localeKey', null, self::$plugin->getTemplatePath() . 'localeFileKeyGridCell.tpl', $cellProvider, array('tabIndex' => 1)));
     // Value column (custom template displays English text)
     $this->addColumn(new ListbuilderGridColumn($this, 'value', 'plugins.generic.translator.localeKeyValue', null, self::$plugin->getTemplatePath() . 'localeFileValueGridCell.tpl', $cellProvider, array('tabIndex' => 2, 'width' => 70, 'alignment' => COLUMN_ALIGNMENT_LEFT)));
 }
开发者ID:bozana,项目名称:translator,代码行数:29,代码来源:LocaleFileListbuilderHandler.inc.php

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

示例3: initialize

 function initialize(&$request)
 {
     parent::initialize($request);
     // Basic configuration
     $this->setSourceTitle('user.role.reviewers');
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT);
     // Drop-down select
     $this->setListTitle('user.role.reviewers');
     $this->loadList($request);
     $this->addColumn(new GridColumn('item', 'common.name'));
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:11,代码来源:ReSelectReviewersListbuilderHandler.inc.php

示例4: initialize

 function initialize(&$request)
 {
     parent::initialize($request);
     // Basic configuration
     $this->setTitle('submission.files');
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT);
     // Free text input
     $this->setListTitle('editor.monograph.copyediting.currentFiles');
     $this->loadList($request);
     $this->loadPossibleItemList($request);
     $this->addColumn(new GridColumn('item', 'common.name'));
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:12,代码来源:CopyeditingFilesListbuilderHandler.inc.php

示例5: initialize

 /**
  * @see PKPHandler::initialize()
  */
 function initialize(&$request)
 {
     parent::initialize($request);
     // Basic configuration.
     $this->setSourceTitle('common.name');
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT);
     $this->setListTitle('submission.submit.currentParticipants');
     // Load possible items.
     $this->_loadPossibleItemList($request);
     // Configure listbuilder column.
     $this->addColumn(new GridColumn('item', 'common.name'));
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:15,代码来源:StageParticipantListbuilderHandler.inc.php

示例6: initialize

 /**
  * Configure the grid
  * @param PKPRequest $request
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Basic configuration
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT);
     $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL);
     $this->setSaveFieldName('files');
     // Add the file column
     $itemColumn = new ListbuilderGridColumn($this, 'name', 'common.name', null, null, null, array('anyhtml' => true));
     import('lib.pkp.controllers.listbuilder.files.FileListbuilderGridCellProvider');
     $itemColumn->setCellProvider(new FileListbuilderGridCellProvider());
     $this->addColumn($itemColumn);
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:17,代码来源:FilesListbuilderHandler.inc.php

示例7: initialize

 function initialize(&$request)
 {
     parent::initialize($request);
     // Basic configuration
     $this->setTitle('listbuilder.contributors.addContributor');
     $this->setSourceTitle('common.name');
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT);
     // Free text input
     $this->setListTitle('submission.submit.currentContributors');
     $this->loadList($request);
     $this->loadPossibleItemList($request);
     $this->addColumn(new GridColumn('item', 'common.name'));
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:13,代码来源:ChapterContributorListbuilderHandler.inc.php

示例8: initialize

 /**
  * @copydoc ListbuilderHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_ADMIN);
     // Basic configuration
     $this->setTitle('admin.categories');
     $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL);
     $this->setSaveFieldName('categories');
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_TEXT);
     // Title column
     $titleColumn = new MultilingualListbuilderGridColumn($this, 'name', 'common.name', null, null, null, null, array('tabIndex' => 1));
     import('controllers.listbuilder.admin.categories.CategoryListbuilderGridCellProvider');
     $titleColumn->setCellProvider(new CategoryListbuilderGridCellProvider());
     $this->addColumn($titleColumn);
 }
开发者ID:mariojp,项目名称:ojs,代码行数:18,代码来源:CategoryListbuilderHandler.inc.php

示例9: initialize

 /**
  * @see PKPHandler::initialize()
  */
 function initialize(&$request)
 {
     parent::initialize($request);
     $userId = (int) $request->getUserVar('userId');
     $this->setUserId($userId);
     // Basic configuration
     $this->setTitle($request->getUserVar('title'));
     $this->setSourceTitle('manager.users.availableRoles');
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT);
     $this->setListTitle('manager.users.currentRoles');
     $this->setAdditionalData(array('userId' => $userId));
     $this->_loadPossibleItemList($request);
     $this->_loadList($request);
     $this->addColumn(new GridColumn('item', 'common.name'));
     $this->addColumn(new GridColumn('attribute', 'common.designation'));
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:19,代码来源:UserUserGroupListbuilderHandler.inc.php

示例10: initialize

 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     // Load submission-specific translations
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION);
     import('lib.pkp.classes.linkAction.request.NullAction');
     $this->addAction(new LinkAction('addItem', new NullAction(), __('grid.action.addUser'), 'add_user'));
     // Basic configuration.
     $this->setTitle('editor.submission.stageParticipants');
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT);
     $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL);
     $this->setSaveFieldName('users');
     // Name column
     $nameColumn = new ListbuilderGridColumn($this, 'name', 'common.name');
     import('lib.pkp.controllers.listbuilder.users.UserListbuilderGridCellProvider');
     $cellProvider = new UserListbuilderGridCellProvider();
     $nameColumn->setCellProvider($cellProvider);
     $this->addColumn($nameColumn);
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:22,代码来源:UsersListbuilderHandler.inc.php

示例11: initialize

 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     // FIXME Validate user ID?
     // Load user-related translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_USER);
     $this->setUserId((int) $request->getUserVar('userId'));
     $this->setContext($request->getContext());
     parent::initialize($request);
     // Basic configuration
     $this->setTitle($request->getUserVar('title'));
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT);
     $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL);
     $this->setSaveFieldName('roles');
     import('lib.pkp.controllers.listbuilder.users.UserGroupListbuilderGridCellProvider');
     $cellProvider = new UserGroupListbuilderGridCellProvider();
     // Name column
     $nameColumn = new ListbuilderGridColumn($this, 'name', 'common.name', null, null, $cellProvider, array('width' => 75, 'alignment' => COLUMN_ALIGNMENT_LEFT));
     $this->addColumn($nameColumn);
     // Designation column
     $designationColumn = new ListbuilderGridColumn($this, 'designation', 'common.designation', null, 'controllers/listbuilder/listbuilderNonEditGridCell.tpl', $cellProvider, array('width' => 25, 'alignment' => COLUMN_ALIGNMENT_LEFT));
     $this->addColumn($designationColumn);
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:25,代码来源:UserUserGroupListbuilderHandler.inc.php

示例12: initialize

 /**
  * Configure the grid
  * @param PKPRequest $request
  */
 function initialize($request)
 {
     parent::initialize($request);
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_APP_SUBMISSION);
     // Basic configuration
     $this->setPress($request->getPress());
     $this->setTitle('submission.submit.placement.categories');
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT);
     $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL);
     $this->setSaveFieldName('categories');
     $this->setSubmissionId($request->getUserVar('submissionId'));
     // Name column
     $nameColumn = new ListbuilderGridColumn($this, 'name', 'common.name');
     import('controllers.listbuilder.categories.CategoryListbuilderGridCellProvider');
     $nameColumn->setCellProvider(new CategoryListbuilderGridCellProvider());
     $this->addColumn($nameColumn);
 }
开发者ID:PublishingWithoutWalls,项目名称:omp,代码行数:21,代码来源:CategoriesListbuilderHandler.inc.php

示例13: initialize

 /**
  * @see ListbuilderHandler::initialize()
  */
 function initialize($request)
 {
     // Basic configuration.
     // Currently this component only works with
     // these configurations, but, if needed, it's
     // easy to adapt this class to work with the other
     // listbuilders configuration.
     parent::initialize($request, false);
     $this->setSourceType(LISTBUILDER_SOURCE_TYPE_NONE);
     $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL);
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:14,代码来源:MultipleListsListbuilderHandler.inc.php

示例14: initialize

 /**
  * @copydoc ListbuilderHandler::initialize()
  */
 function initialize($request)
 {
     $this->setContext($request->getContext());
     return parent::initialize($request);
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:8,代码来源:SetupListbuilderHandler.inc.php


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