/** * @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); $subEditorId = $newRowId['name']; $userDao = DAORegistry::getDAO('UserDAO'); return $userDao->getById($subEditorId); }
/** * @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); import('lib.pkp.controllers.grid.content.navigation.form.FooterCategoryForm'); $context = $request->getContext(); $footerCategoryForm = new FooterCategoryForm($context->getId()); return $footerCategoryForm->getFooterLinkFromRowData($request, $rowData); }
/** * @copydoc GridHandler::getRowDataElement() * Get the data element that corresponds to the current request * Allow for a blank $rowId for when creating a not-yet-persisted row */ 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); $categoryId = $newRowId['name']; $categoryDao = DAORegistry::getDAO('CategoryDAO'); $entryDao = $categoryDao->getEntryDAO(); return $entryDao->getById($categoryId, $categoryDao->build()->getId()); }
/** * @copydoc GridHandler::getRowDataElement */ protected function getRowDataElement($request, &$rowId) { // Fallback on the parent if an existing rowId is found if (!empty($rowId)) { return parent::getRowDataElement($request, $rowId); } // If we're bouncing a row back upon a row edit $rowData = $this->getNewRowId($request); if ($rowData) { return array(array('content' => $rowData['possibleResponse'])); } // If we're generating an empty row to edit return array(array('content' => array())); }