public static function Init($params)
 {
     DebugManager::Log("Got a logout request!", '@');
     $Account = SessionManager::GetAccount();
     try {
         $Location = LocationController::Create($params);
     } catch (Exception $e) {
         $Locations = LocationController::Search($params);
         $Location = reset($Locations);
     }
     try {
         $Venue = VenueController::Update(array('ids' => $params['venue_id'], 'location_id' => $Location['id']));
     } catch (Exception $e) {
     }
     self::$defaultRedirect = 'venue/' . $Venue['id'];
     return new ResponseObject();
 }
 public static function Init($data)
 {
     if (isset($data['page']['params']['id'])) {
         $Venue = VenueController::Get(array('ids' => $data['page']['params']['id']));
         if ($Venue['location_id']) {
             $Location = LocationController::Get(array('ids' => $Venue['location_id']));
             $Location['full'] = $Location['address'] . ', ' . $Location['city'] . ', ' . $Location['state'] . ' ' . $Location['postal'] . ', ' . $Location['country'];
             $Venue['location'] = $Location;
         }
         $Hostings = HosterController::Search(array('venue_id' => $Venue['id'], 'operator' => 'eq'));
         foreach ($Hostings as $Hosting) {
             $Event = EventController::Get(array('ids' => $Hosting['event_id']));
             $Event['attendees'] = AttendeeController::Search(array('event_id' => $Event['id'], 'state' => '1', 'operator' => 'eq'));
             $Event['maybees'] = AttendeeController::Search(array('event_id' => $Event['id'], 'state' => '2', 'operator' => 'eq'));
             $Venue['events'][] = $Event;
         }
         $data['venue'] = $Venue;
     } else {
     }
     self::SetData($data);
 }