/**
* @see GridHandler::getRowDataElement()
*/
protected function getRowDataElement($request, $rowId)
{
$rowData = parent::getRowDataElement($request, $rowId);
$rowCategoryId = $request->getUserVar('rowCategoryId');
if (is_null($rowData) && !is_null($rowCategoryId)) {
// Try to get row data inside category.
$categoryRowData = parent::getRowDataElement($request, $rowCategoryId);
if (!is_null($categoryRowData)) {
$categoryElements = $this->getCategoryData($categoryRowData, null);
assert(is_array($categoryElements));
if (!isset($categoryElements[$rowId])) {
return null;
}
// Let grid (and also rows) knowing the current category id.
// This value will be published by the getRequestArgs method.
$this->_currentCategoryId = $rowCategoryId;
return $categoryElements[$rowId];
}
} else {
return $rowData;
}
}