Data passed by DataBin Grid functionality. $dateTimeFormat = \Utility\Definitions\Locale::getDateTimeFormat(); $auth = \Utility\Registry::getAuthData(); foreach ($this->_data as $rowId => $rowData) { $myOffer = $this->em->getRepository('\PriceGuide\Entity\Offer') ->findOneBy(array( 'priceGuideStock' => $this->_data[$rowId]['priceGuide_id'], 'company' => $auth['company']['id'] )); $this->_data[$rowId]['priceGuide_id'] = is_object($myOffer) ? $myOffer->amount : 0.0; $this->em->clear('\PriceGuide\Entity\Offer'); $this->_data[$rowId]['priceGuide_created'] = $rowData['priceGuide_created']->format($dateTimeFormat); $this->_data[$rowId]['priceGuide_updated'] = !is_null($rowData['priceGuide_updated']) ? $rowData['priceGuide_updated']->format($dateTimeFormat) : ''; if ('Updateable Offers' == $this->_data[$rowId]['priceGuide_jobState'] || 'Open4Offers' == $this->_data[$rowId]['priceGuide_jobState']) { $this->_data[$rowId]['stock_highestOffer'] = 0.0; } } } }