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