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