Exemplo n.º 1
0
 /**
  * @param $locationId
  * @return Location
  */
 public function getLocation($locationId)
 {
     if (null !== $this->currentLocation && $this->currentLocation->getId() == $locationId) {
         return $this->currentLocation;
     }
     return $this->container->get('consim.core.entity.location')->load($locationId);
 }
Exemplo n.º 2
0
 /**
  * @param \consim\core\entity\Location $userLocation
  */
 public function locationWidget(\consim\core\entity\Location $userLocation)
 {
     $this->template->assign_vars(array('IS_LOCATION_WIDGET' => True, 'USER_LOCATION_WIDGET' => $userLocation->getName(), 'USER_LOCATION_TYPE_WIDGET' => $userLocation->getType(), 'USER_LOCATION_URL_WIDGET' => $this->helper->route('consim_core_location', array('location_id' => $userLocation->getId())), 'USER_PROVINCE_WIDGET' => $userLocation->getProvince(), 'USER_COUNTRY_WIDGET' => $userLocation->getCountry()));
 }