/** * Renders an aggregate row for given aggregate row configuration and given row index * * @param Tx_PtExtlist_Domain_Model_List_Row $aggregateDataRow Row to be rendered * @param Tx_PtExtlist_Domain_Configuration_Aggregates_AggregateRowConfig $aggregateRowConfig Config used to render aggregate row * @param integer $rowIndex Index of rendered row * @return Tx_PtExtlist_Domain_Model_List_ListData Rendered aggregate row */ public function renderAggregateRow(Tx_PtExtlist_Domain_Model_List_Row $aggregateDataRow, Tx_PtExtlist_Domain_Configuration_Aggregates_AggregateRowConfig $aggregateRowConfig, $rowIndex) { $renderedRow = new Tx_PtExtlist_Domain_Model_List_Row(); $columnCollection = $this->getColumnCollection(); foreach ($columnCollection as $columnIdentifier => $column) { /* @var $column Tx_PtExtlist_Domain_Model_List_Header_HeaderColumn */ $columnConfiguration = $column->getColumnConfig(); if ($columnConfiguration->isAccessable() && $column->getIsVisible()) { if ($aggregateRowConfig->hasItem($columnConfiguration->getColumnIdentifier())) { $cell = $this->renderCell($aggregateRowConfig->getItemById($columnConfiguration->getColumnIdentifier()), $aggregateDataRow, $columnIdentifier, $rowIndex); } else { $cell = new Tx_PtExtlist_Domain_Model_List_Cell(); } $renderedRow->addCell($cell, $columnIdentifier); } } unset($aggregateDataRow); return $renderedRow; }