本文整理汇总了PHP中DataObjectGridCellProvider类的典型用法代码示例。如果您正苦于以下问题:PHP DataObjectGridCellProvider类的具体用法?PHP DataObjectGridCellProvider怎么用?PHP DataObjectGridCellProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DataObjectGridCellProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例4: SalesRightsGridCellProvider
/**
* Constructor
*/
function SalesRightsGridCellProvider()
{
parent::DataObjectGridCellProvider();
}
开发者ID:josekarvalho,项目名称:omp,代码行数:7,代码来源:SalesRightsGridCellProvider.inc.php
示例5: IdentificationCodeGridCellProvider
/**
* Constructor
*/
function IdentificationCodeGridCellProvider()
{
parent::DataObjectGridCellProvider();
}
开发者ID:josekarvalho,项目名称:omp,代码行数:7,代码来源:IdentificationCodeGridCellProvider.inc.php
示例6: EventLogGridCellProvider
/**
* Constructor
*/
function EventLogGridCellProvider()
{
parent::DataObjectGridCellProvider();
}
开发者ID:mczirfusz,项目名称:pkp-lib,代码行数:7,代码来源:EventLogGridCellProvider.inc.php
示例7: PublicationFormatGridCellProvider
/**
* Constructor
* @param $monographId int
* @param $inCatalogEntryModal boolean Tells if grid is loaded inside
* catalog entry modal.
*/
function PublicationFormatGridCellProvider($monographId, $inCatalogEntryModal)
{
parent::DataObjectGridCellProvider();
$this->_monographId = $monographId;
$this->_inCatalogEntryModal = $inCatalogEntryModal;
}
开发者ID:sdp-uab,项目名称:omp,代码行数:12,代码来源:PublicationFormatGridCellProvider.inc.php
示例8: StageParticipantGridCellProvider
/**
* Constructor
*/
function StageParticipantGridCellProvider()
{
parent::DataObjectGridCellProvider();
}
开发者ID:ramonsodoma,项目名称:omp,代码行数:7,代码来源:StageParticipantGridCellProvider.inc.php
示例9: SubmissionParticipantGridCellProvider
/**
* Constructor
*/
function SubmissionParticipantGridCellProvider()
{
parent::DataObjectGridCellProvider();
}
开发者ID:jerico-dev,项目名称:omp,代码行数:7,代码来源:SubmissionParticipantGridCellProvider.inc.php
示例10: AddThisStatisticsGridCellProvider
/**
* Constructor
*/
function AddThisStatisticsGridCellProvider()
{
parent::DataObjectGridCellProvider();
}
开发者ID:josekarvalho,项目名称:omp,代码行数:7,代码来源:AddThisStatisticsGridCellProvider.inc.php
示例11: ReviewerSelectGridCellProvider
/**
* Constructor
*/
function ReviewerSelectGridCellProvider()
{
parent::DataObjectGridCellProvider();
}
开发者ID:jerico-dev,项目名称:omp,代码行数:7,代码来源:ReviewerSelectGridCellProvider.inc.php
示例12: UserEnrollmentGridCellProvider
/**
* Constructor
*/
function UserEnrollmentGridCellProvider($pressId)
{
$this->pressId = $pressId;
parent::DataObjectGridCellProvider();
}
开发者ID:ramonsodoma,项目名称:omp,代码行数:8,代码来源:UserEnrollmentGridCellProvider.inc.php
示例13: MarketsGridCellProvider
/**
* Constructor
*/
function MarketsGridCellProvider()
{
parent::DataObjectGridCellProvider();
}
开发者ID:josekarvalho,项目名称:omp,代码行数:7,代码来源:MarketsGridCellProvider.inc.php
示例14: getTemplateVarsFromRowColumn
/**
* @see GridCellProvider::getTemplateVarsFromRowColumn()
*/
function getTemplateVarsFromRowColumn(&$row, $column)
{
$templateVars = parent::getTemplateVarsFromRowColumn($row, $column);
$element =& $row->getData();
assert(is_a($element, 'Citation'));
$templateVars['isApproved'] = $element->getCitationState() == CITATION_APPROVED ? true : false;
$templateVars['isCurrentItem'] = $row->getIsCurrentItem();
$templateVars['citationSeq'] = $element->getSeq();
return $templateVars;
}
开发者ID:yuricampos,项目名称:ojs,代码行数:13,代码来源:PKPCitationGridCellProvider.inc.php
示例15: getCellActions
/**
* Get cell actions associated with this row/column combination
* @param $row GridRow
* @param $column GridColumn
* @return array an array of LegacyLinkAction instances
*/
function getCellActions(&$request, &$row, &$column, $position = GRID_ACTION_POSITION_DEFAULT)
{
if ($column->getId() == 'files') {
$monographFile =& $row->getData();
$router =& $request->getRouter();
$actionArgs = array('gridId' => $row->getGridId(), 'monographId' => $monographFile->getMonographId(), 'fileId' => $monographFile->getFileId());
$action =& new LegacyLinkAction('downloadFile', LINK_ACTION_MODE_LINK, LINK_ACTION_TYPE_NOTHING, $router->url($request, null, null, 'downloadFile', null, $actionArgs), null, $monographFile->getOriginalFileName());
return array($action);
}
return parent::getCellActions($request, $row, $column, $position);
}
开发者ID:ramonsodoma,项目名称:omp,代码行数:17,代码来源:ReviewAttachmentsGridCellProvider.inc.php
示例16: getCellActions
function getCellActions($request, $row, $column, $position = GRID_ACTION_POSITION_ROW_CLICK)
{
$submissionFile = $row->getData();
$router = $request->getRouter();
switch ($column->getId()) {
case 'name':
$dispatcher = $request->getDispatcher();
return array(new LinkAction('editSubmissionFile', new AjaxModal($router->url($request, null, null, 'editSubmissionFile', null, array('submissionFileId' => $submissionFile->getFileId(), 'submissionId' => $this->_submissionId)), __('grid.action.edit'), 'modal_edit', true), __('plugins.generic.vgWort.grid.action.edit'), 'edit'));
default:
return parent::getCellActions($request, $row, $column, $position);
}
}
开发者ID:kadowa,项目名称:omp-vgwort-plugin,代码行数:12,代码来源:VGWortPrivateGridCellProvider.inc.php
示例17: getCellActions
/**
* @copydoc GridCellProvider::getCellActions()
*/
function getCellActions($request, $row, $column)
{
switch ($column->getId()) {
case 'label':
$element = $row->getData();
if ($element->getRemoteUrl() != '' || !$element->getFileId()) {
break;
}
$submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');
import('lib.pkp.classes.submission.SubmissionFile');
$submissionFile = $submissionFileDao->getLatestRevision($element->getFileId(), null, $element->getSubmissionId());
import('lib.pkp.controllers.api.file.linkAction.DownloadFileLinkAction');
return array(new DownloadFileLinkAction($request, $submissionFile, $request->getUserVar('stageId'), $element->getLabel()));
}
return parent::getCellActions($request, $row, $column);
}
开发者ID:pkp,项目名称:ojs,代码行数:19,代码来源:ArticleGalleyGridCellProvider.inc.php
示例18: getCellActions
/**
* @copydoc GridCellProvider::getCellActions()
*/
function getCellActions($request, $row, $column)
{
switch ($column->getId()) {
case 'contents':
$element = $row->getData();
$submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');
import('lib.pkp.classes.submission.SubmissionFile');
$submissionFiles = $submissionFileDao->getLatestRevisionsByAssocId(ASSOC_TYPE_NOTE, $element->getId(), $this->_submission->getId(), SUBMISSION_FILE_QUERY);
import('lib.pkp.controllers.api.file.linkAction.DownloadFileLinkAction');
$actions = array();
foreach ($submissionFiles as $submissionFile) {
$actions[] = new DownloadFileLinkAction($request, $submissionFile, $request->getUserVar('stageId'));
}
return $actions;
}
return parent::getCellActions($request, $row, $column);
}
开发者ID:mczirfusz,项目名称:pkp-lib,代码行数:20,代码来源:QueryNotesGridCellProvider.inc.php
示例19: getCellActions
/**
* Get cell actions associated with this row/column combination
* @param $row GridRow
* @param $column GridColumn
* @return array an array of LinkAction instances
*/
function getCellActions($request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT)
{
if ($column->getId() == 'title') {
$submission = $row->getData();
if (is_a($submission, 'ReviewerSubmission')) {
// Reviewer: Add a review link action.
return array($this->_getCellLinkAction($request, 'reviewer', 'submission', $submission));
} else {
// Get the right page and operation (authordashboard or workflow).
list($page, $operation) = SubmissionsListGridCellProvider::getPageAndOperationByUserRoles($request, $submission);
// Return redirect link action.
return array($this->_getCellLinkAction($request, $page, $operation, $submission));
}
// This should be unreachable code.
assert(false);
}
return parent::getCellActions($request, $row, $column, $position);
}
开发者ID:doana,项目名称:pkp-lib,代码行数:24,代码来源:SubmissionsListGridCellProvider.inc.php
示例20: getCellActions
/**
* @copydoc GridCellProvider::getCellActions()
*/
function getCellActions($request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT)
{
switch ($column->getId()) {
case 'enabled':
$element = $row->getData();
/* @var $element DataObject */
$router = $request->getRouter();
import('lib.pkp.classes.linkAction.LinkAction');
if ($element->getCanDisable()) {
if ($element->getEnabled()) {
return array(new LinkAction('disableEmail', new RemoteActionConfirmationModal($request->getSession(), __('manager.emails.disable.message'), null, $router->url($request, null, 'grid.settings.preparedEmails.PreparedEmailsGridHandler', 'disableEmail', null, array('emailKey' => $element->getEmailKey()))), __('manager.emails.disable'), 'disable'));
} else {
return array(new LinkAction('enableEmail', new RemoteActionConfirmationModal($request->getSession(), __('manager.emails.enable.message'), null, $router->url($request, null, 'grid.settings.preparedEmails.PreparedEmailsGridHandler', 'enableEmail', null, array('emailKey' => $element->getEmailKey()))), __('manager.emails.enable'), 'enable'));
}
}
}
return parent::getCellActions($request, $row, $column, $position);
}
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:21,代码来源:PreparedEmailsGridCellProvider.inc.php
注:本文中的DataObjectGridCellProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论