<?php
$cityModule = new \Zend\Session\Container('cityModule');
$cityId = isset($cityModule->city_id) ? $cityModule->city_id : '';
//$cityId = '707';
$moduleData = $this->mainMenu()->getServiceModuleByCity($cityId);
if (!empty($moduleData) && $cityId != "") {
foreach($moduleData as $val){
    $url = strtolower(str_replace(' ', '-', $val['module_name']));
    $action = "index";
    if($val['module_name']=='Outstation' || $val['module_name']=='One Way'){
        $action = "one-way";
        $url = "outstation";
    }if($val['module_name']=='Outstation'){
        $action = "round-trip";
        $url = "outstation";
    }
    $url = $this->url($url, ['controller' => 'index', 'action' => $action],['query'=>['city'=>$val['city_name'],'city_id'=>$val['city_id']]]);
?>

<div class="form_meubg service-module">
    <a href="<?php echo $url; ?>">
        <div class="menuicon"><i class="fa <?php echo $val['module_icon']; ?>"></i></div>
        <div class="over-text pull-left disable_none service-show"><?php echo $val['module_name']; ?></div>
    </a>
</div>
    
<?php }?>

    <?php
}
?>