public function getCityName($cityId) { $cityNameHelper = new CityName(); $cityNameHelper->setServiceLocator($this->serviceLocator); $cityName = $cityNameHelper->getFromCache($cityId); if (!$cityName) { return FALSE; } return strtolower(str_replace(' ', '-', $cityName)); }
public function getViewHelperConfig() { return array('factories' => array('textline' => function ($helperPluginManager) { $serviceLocator = $helperPluginManager->getServiceLocator(); $helper = new View\Helper\Textline(); $helper->setServiceLocator($serviceLocator); return $helper; }, 'productTextline' => function ($helperPluginManager) { $serviceLocator = $helperPluginManager->getServiceLocator(); $helper = new View\Helper\ProductTextline(); $helper->setServiceLocator($serviceLocator); return $helper; }, 'cityName' => function ($helperPluginManager) { $serviceLocator = $helperPluginManager->getServiceLocator(); $helper = new View\Helper\CityName(); $helper->setServiceLocator($serviceLocator); return $helper; }, 'phoneNumber' => function ($helperPluginManager) { $serviceLocator = $helperPluginManager->getServiceLocator(); $helper = new View\Helper\PhoneNumber(); $helper->setServiceLocator($serviceLocator); return $helper; }, 'provinceName' => function ($helperPluginManager) { $serviceLocator = $helperPluginManager->getServiceLocator(); $helper = new View\Helper\ProvinceName(); $helper->setServiceLocator($serviceLocator); return $helper; }, 'countryName' => function ($helperPluginManager) { $serviceLocator = $helperPluginManager->getServiceLocator(); $helper = new View\Helper\CountryName(); $helper->setServiceLocator($serviceLocator); return $helper; }, 'currencyList' => function ($helperPluginManager) { $serviceLocator = $helperPluginManager->getServiceLocator(); $helper = new View\Helper\CurrencyList(); $helper->setServiceLocator($serviceLocator); return $helper; }, 'currencyUser' => function ($helperPluginManager) { $helper = new View\Helper\CurrencyUser(); return $helper; }, 'urltoCity' => function ($helperPluginManager) { $serviceLocator = $helperPluginManager->getServiceLocator(); $helper = new View\Helper\UrlToCity(); $helper->setServiceLocator($serviceLocator); return $helper; }, 'customBreadcrumb' => function ($helperPluginManager) { $serviceLocator = $helperPluginManager->getServiceLocator(); $helper = new View\Helper\CustomBreadcrumb(); $helper->setServiceLocator($serviceLocator); return $helper; }, 'userTracking' => function ($sm) { $viewHelper = new View\Helper\UserTracking(); $viewHelper->setServiceLocator($sm->getServiceLocator()); return $viewHelper; }, 'googleTagManager' => function ($sm) { $googleTagManagerHelper = new GoogleTagManager\GoogleTagManager(); $googleTagManagerHelper->setServiceLocator($sm->getServiceLocator()); return $googleTagManagerHelper; })); }