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


PHP ListbuilderHandler::getRowDataElement方法代码示例

本文整理汇总了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);
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:16,代码来源:UsersListbuilderHandler.inc.php

示例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;
 }
开发者ID:mariojp,项目名称:ojs,代码行数:17,代码来源:CategoryListbuilderHandler.inc.php

示例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());
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:16,代码来源:UserUserGroupListbuilderHandler.inc.php

示例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());
 }
开发者ID:NateWr,项目名称:omp,代码行数:20,代码来源:ChapterAuthorListbuilderHandler.inc.php

示例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;
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:25,代码来源:FilesListbuilderHandler.inc.php

示例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;
 }
开发者ID:PublishingWithoutWalls,项目名称:omp,代码行数:17,代码来源:CategoriesListbuilderHandler.inc.php

示例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'];
 }
开发者ID:bozana,项目名称:translator,代码行数:16,代码来源:LocaleFileListbuilderHandler.inc.php


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