protected function getMarketOfficeZonesDrivers() { $marketOfficeHelper = new MarketOfficeHelper(); $market_office = $marketOfficeHelper->getMarketOffice(); $delivery_zones = $marketOfficeHelper->getZones($market_office['market_ofc_ids']); $zones = $delivery_zones['delivery_zones']; foreach ($market_office['market_ofc'] as $key => $val) { if (!empty($zones[$key])) { $market_office['market_ofc'][$key]['zones'] = $zones[$key]; } else { $market_office['market_ofc'][$key]['zones'] = array(); } } return array("market_ofc" => $market_office['market_ofc'], 'total_driver_cnt' => $delivery_zones['count']); }
protected function getMarketOfficeZonesCnt() { $mrktOfcZoneCnt = array(); $marketOfficeHelper = new MarketOfficeHelper(); $market_office = $marketOfficeHelper->getMarketOffice(); foreach ($market_office['market_ofc'] as $k => $v) { $mrktOfcZoneCnt[] = array('id' => $v['id'], 'office_name' => $v['office_name'], 'zones' => $this->zoneCntInMrkt($v['id'])); } return array("mrktOfcZoneCnt" => $mrktOfcZoneCnt); }