예제 #1
0
 public static function Init($data)
 {
     if (isset($data['page']['params']['id'])) {
         $Account = AccountController::Get(array('ids' => $data['page']['params']['id']));
         $Memberships = MembershipController::Search(array('account_id' => $Account['id'], 'operator' => 'eq'));
         foreach ($Memberships as $Membership) {
             $Act = ActController::Get(array('ids' => $Membership['act_id']));
             $Roles = RoleController::Search(array('membership_id' => $Membership['id'], 'operator' => 'eq'));
             foreach ($Roles as $Role) {
                 $Tag = TagController::Get(array('ids' => $Role['tag_id']));
                 $Act['roles'][$Tag['title']] = $Tag['title'];
                 $Account['roles'][$Tag['title']][$Act['id']] = $Act;
             }
             $Performances = PerformanceController::Search(array('act_id' => $Act['id']));
             foreach ($Performances as $Performance) {
                 $Event = EventController::Get(array('ids' => $Performance['event_id']));
                 $Account['performances'][$Performance['id']] = array('where' => $Event, 'as' => $Act, 'when' => $Performance, 'with' => array());
                 $Act['performances'][$Event['id']] = $Event;
             }
             $Account['acts'][$Act['id']] = $Act;
         }
         $Attendings = AttendeeController::Search(array('account_id' => $Account['id'], 'operator' => 'eq'));
         foreach ($Attendings as $Attending) {
             $Event = EventController::Get(array('ids' => $Attending['event_id']));
             $Account['attending'][$Event['id']] = $Event;
         }
         $data['account'] = $Account;
     } else {
     }
     self::SetData($data);
 }
예제 #2
0
 public static function Init($data)
 {
     if (isset($data['page']['params']['id'])) {
         $Event = EventController::Get(array('ids' => $data['page']['params']['id']));
         $Hostings = HosterController::Search(array('event_id' => $Event['id'], 'operator' => 'eq'));
         foreach ($Hostings as $Hosting) {
             $Venue = VenueController::Get(array('ids' => $Hosting['venue_id']));
             $Event['venues'][$Venue['id']] = $Venue;
         }
         $Performances = PerformanceController::Search(array('event_id' => $Event['id'], 'operator' => 'eq'));
         foreach ($Performances as $Performance) {
             $Act = ActController::Get(array('ids' => $Performance['act_id']));
             $Act['slot'] = $Performance['slot'];
             $Event['acts'][$Act['slot']] = $Act;
         }
         $data['event'] = $Event;
     } else {
     }
     self::SetData($data);
 }
예제 #3
0
 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);
 }