Example #1
0
 /**
  * @param City $city
  * @param null $lang
  * @param bool $absolute
  * @return bool
  */
 public function generateCityUrl(City $city, $lang = null, $absolute = false)
 {
     if ($lang === null) {
         $lang = $this->context->get('language');
     }
     $slug = $city->getSlug();
     if ($slug && $lang) {
         return $this->router->generate('destination_sheet_city', array('slugCity' => $slug, 'locale' => $lang), $absolute);
     }
     return false;
 }