本文整理汇总了PHP中ListbuilderHandler::getRowDataElement方法的典型用法代码示例。如果您正苦于以下问题:PHP ListbuilderHandler::getRowDataElement方法的具体用法?PHP ListbuilderHandler::getRowDataElement怎么用?PHP ListbuilderHandler::getRowDataElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListbuilderHandler
的用法示例。
在下文中一共展示了ListbuilderHandler::getRowDataElement方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRowDataElement
/**
* @copydoc GridHandler::getRowDataElement
*/
protected function getRowDataElement($request, &$rowId)
{
// fallback on the parent if a rowId is found
if (!empty($rowId)) {
return parent::getRowDataElement($request, $rowId);
}
// Otherwise return from the newRowId
// FIXME: Validate user ID?
$newRowId = $this->getNewRowId($request);
$userId = (int) $newRowId['name'];
$userDao = DAORegistry::getDAO('UserDAO');
return $userDao->getById($userId);
}
示例2: getRowDataElement
/**
* @copydoc GridHandler::getRowDataElement
*/
protected function getRowDataElement($request, &$rowId)
{
// fallback on the parent if a rowId is found
if (!empty($rowId)) {
return parent::getRowDataElement($request, $rowId);
}
// Otherwise return from the $newRowId
$rowData = $this->getNewRowId($request);
$categoryDao = DAORegistry::getDAO('CategoryDAO');
$category = $categoryDao->getEntryDao()->newDataObject();
$category->setName($rowData['name'], null);
// Localized
return $category;
}
示例3: getRowDataElement
/**
* @copydoc GridHandler::getRowDataElement
*/
protected function getRowDataElement($request, &$rowId)
{
// fallback on the parent if a rowId is found
if (!empty($rowId)) {
return parent::getRowDataElement($request, $rowId);
}
// Otherwise return from the $newRowId
$newRowId = $this->getNewRowId($request);
$userGroupId = $newRowId['name'];
$userGroupDao = DAORegistry::getDAO('UserGroupDAO');
$context = $this->getContext();
return $userGroupDao->getById($userGroupId, $context->getId());
}
示例4: getRowDataElement
/**
* @copydoc GridHandler::getRowDataElement
*/
function getRowDataElement($request, &$rowId)
{
// fallback on the parent if a rowId is found
if (!empty($rowId)) {
return parent::getRowDataElement($request, $rowId);
}
$id = 0;
// Otherwise return from the newRowId
$authorId = $this->getNewRowId($request);
// this is an array: Example: $authorId['name'] => 25
if (isset($authorId['name'])) {
$id = (int) $authorId['name'];
}
$authorDao = DAORegistry::getDAO('AuthorDAO');
$monograph = $this->getMonograph();
return $authorDao->getById($id, $monograph->getId());
}
示例5: getRowDataElement
/**
* @copydoc GridHandler::getRowDataElement()
*/
protected function getRowDataElement($request, &$rowId)
{
// fallback on the parent if a rowId is found
if (!empty($rowId)) {
return parent::getRowDataElement($request, $rowId);
}
// Otherwise return from the newRowId
$newRowId = $this->getNewRowId($request);
$fileId = (int) $newRowId['name'];
$submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
$submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');
/* @var $submissionFileDao SubmissionFileDAO */
import('lib.pkp.classes.submission.SubmissionFile');
// Bring in const
$submissionFiles = $submissionFileDao->getLatestRevisions($submission->getId(), $this->getFileStage());
foreach ($submissionFiles as $submissionFile) {
if ($submissionFile->getFileId() == $fileId) {
return $submissionFile;
}
}
return null;
}
示例6: getRowDataElement
/**
* @copydoc GridHandler::getRowDataElement
*/
function getRowDataElement($request, &$rowId)
{
// fallback on the parent if a rowId is found
if (!empty($rowId)) {
return parent::getRowDataElement($request, $rowId);
}
// Otherwise return from the $newRowId
$newRowId = $this->getNewRowId($request);
$categoryId = $newRowId['name'];
$categoryDao = DAORegistry::getDAO('CategoryDAO');
$press = $request->getPress();
$category = $categoryDao->getById($categoryId, $press->getId());
return $category;
}
示例7: getRowDataElement
/**
* @copydoc GridHandler::getRowDataElement
*/
function getRowDataElement($request, &$rowId)
{
// fallback on the parent if a rowId is found
if (!empty($rowId)) {
return parent::getRowDataElement($request, $rowId);
}
// A new row is being bounced back to the user.
// Supply a new ID from the specified key.
$newRowId = $request->getUserVar('newRowId');
$rowId = $newRowId['key'];
// Send the value specified back to the user for formatting.
return $newRowId['value'];
}