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


PHP DataObjectGridCellProvider::setLocale方法代码示例

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


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

示例1: initialize

 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request)
 {
     parent::initialize($request);
     $press = $request->getPress();
     $this->_pressId = $press->getId();
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_MANAGER);
     // Set the grid title.
     $this->setTitle('grid.category.categories');
     // Add grid-level actions.
     $router = $request->getRouter();
     $this->addAction(new LinkAction('addCategory', new AjaxModal($router->url($request, null, null, 'addCategory'), __('grid.category.add'), 'modal_manage'), __('grid.category.add'), 'add_category'));
     // Add grid columns.
     $cellProvider = new DataObjectGridCellProvider();
     $cellProvider->setLocale(AppLocale::getLocale());
     $this->addColumn(new GridColumn('title', 'grid.category.name', null, null, $cellProvider));
 }
开发者ID:PublishingWithoutWalls,项目名称:omp,代码行数:19,代码来源:CategoryCategoryGridHandler.inc.php

示例2: initialize

 function initialize($request)
 {
     parent::initialize($request);
     // Load language components
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_MANAGER, LOCALE_COMPONENT_APP_EDITOR, LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_PKP_GRID, LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_APP_DEFAULT);
     // Set the grid title.
     $this->setTitle('grid.genres.title');
     // Add grid-level actions
     $router = $request->getRouter();
     $actionArgs = array('gridId' => $this->getId());
     import('lib.pkp.classes.linkAction.request.AjaxModal');
     $this->addAction(new LinkAction('addGenre', new AjaxModal($router->url($request, null, null, 'addGenre', null, $actionArgs), __('grid.action.addGenre'), 'modal_add_item', true), __('grid.action.addGenre'), 'add_item'));
     import('lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal');
     $this->addAction(new LinkAction('restoreGenres', new RemoteActionConfirmationModal(__('grid.action.restoreDefaults.confirm'), null, $router->url($request, null, null, 'restoreGenres', null, $actionArgs), 'modal_delete'), __('grid.action.restoreDefaults'), 'reset_default'));
     // Columns
     $cellProvider = new DataObjectGridCellProvider();
     $cellProvider->setLocale(AppLocale::getLocale());
     $this->addColumn(new GridColumn('name', 'common.name', null, null, $cellProvider, array('width' => 90)));
     $this->addColumn(new GridColumn('designation', 'common.designation', null, null, $cellProvider));
 }
开发者ID:selwyntcy,项目名称:pkp-lib,代码行数:20,代码来源:GenreGridHandler.inc.php

示例3: initialize

 function initialize(&$request)
 {
     parent::initialize($request);
     // Load language components
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_MANAGER, LOCALE_COMPONENT_OMP_EDITOR, LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_PKP_GRID));
     // Basic grid configuration
     $this->setTitle('manager.setup.genres');
     $press =& $request->getPress();
     // Elements to be displayed in the grid
     $genreDao =& DAORegistry::getDAO('GenreDAO');
     $genres =& $genreDao->getEnabledByPressId($press->getId());
     $this->setData($genres);
     // Add grid-level actions
     $router =& $request->getRouter();
     $actionArgs = array('gridId' => $this->getId());
     $this->addAction(new LegacyLinkAction('addGenre', LINK_ACTION_MODE_MODAL, LINK_ACTION_TYPE_APPEND, $router->url($request, null, null, 'addGenre', null, $actionArgs), 'grid.action.addItem'), GRID_ACTION_POSITION_ABOVE);
     $this->addAction(new LegacyLinkAction('restoreGenres', LINK_ACTION_MODE_CONFIRM, LINK_ACTION_TYPE_REPLACE, $router->url($request, null, null, 'restoreGenres', null, $actionArgs), 'grid.action.restoreDefaults'), GRID_ACTION_POSITION_ABOVE);
     // Columns
     $cellProvider = new DataObjectGridCellProvider();
     $cellProvider->setLocale(Locale::getLocale());
     $this->addColumn(new GridColumn('name', 'common.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('designation', 'common.designation', null, 'controllers/grid/gridCell.tpl', $cellProvider));
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:23,代码来源:GenreGridHandler.inc.php


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