當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Event::getEventItems方法代碼示例

本文整理匯總了PHP中app\Event::getEventItems方法的典型用法代碼示例。如果您正苦於以下問題:PHP Event::getEventItems方法的具體用法?PHP Event::getEventItems怎麽用?PHP Event::getEventItems使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\Event的用法示例。


在下文中一共展示了Event::getEventItems方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: details

 public static function details(Request $request)
 {
     //Note this is piggybacking on regular event controller functions, beware of changing them!!
     $eid = $request->eid;
     $event = Event::getEvent($eid);
     $invites = Self::getInvitesFromEid($eid);
     $all_poll_options = Self::getPollOptionsFromEid($eid);
     $itemslist = Event::getEventItems($eid);
     $userRSVP = Invite::getUserRSVP($eid);
     $items = [];
     $item_users = [];
     $ticketcost = (string) $event['ticketprice'];
     if (!strpos($ticketcost, '.')) {
         $ticketcost = $ticketcost . ".00";
     }
     foreach ($itemslist as $item) {
         array_push($items, $item);
         if ($item->uid != 0) {
             $tmpUser = User::getById($item->uid);
             array_push($item_users, $tmpUser);
         }
     }
     $chat_messages = MessageController::getMessagesFromEid($eid);
     return response()->json(compact('event', 'all_poll_options', 'items', 'invites', 'chat_messages', 'item_users', 'userRSVP', 'ticketcost'));
 }
開發者ID:umSoftEng2GrpE,項目名稱:partEZ,代碼行數:25,代碼來源:ApiEventDetailsController.php

示例2: details

 public function details(Request $request)
 {
     //Note this is piggybacking on regular event controller functions, beware of changing them!!
     $eid = $request['eid'];
     $event = Event::getEvent($eid);
     $invites = EventController::getInvitesFromEid($eid);
     $all_poll_options = EventController::getPollOptionsFromEid($eid);
     $itemslist = Event::getEventItems($eid);
     $items = [];
     foreach ($itemslist as $item) {
         array_push($items, $item);
     }
     $chat_messages = MessageController::getMessagesFromEid($eid);
     return response()->json(compact('event', 'all_poll_options', 'items', 'invites', 'chat_messages'));
 }
開發者ID:maxewaschuk,項目名稱:partEZ,代碼行數:15,代碼來源:ApiEventDetailsController.php

示例3: getEventItems

 public static function getEventItems(Request $request)
 {
     $items = Event::getEventItems($request['eid']);
     return response()->json(compact('items'));
 }
開發者ID:umSoftEng2GrpE,項目名稱:partEZ,代碼行數:5,代碼來源:ApiEventItemController.php

示例4: saveEventEdit

 public function saveEventEdit($eid)
 {
     $input = Request::all();
     $event = Event::find($eid);
     $invites = Self::getInvitesFromEid($eid);
     $all_poll_options = Self::getPollOptionsFromEid($eid);
     $itemslist = Event::getEventItems($eid);
     $items = [];
     if (array_key_exists('public', $input)) {
         $event->public = $input['public'];
     } else {
         $event->public = '';
     }
     $event->name = $input['name'];
     $event->location = $input['location'];
     $event->description = $input['description'];
     $event->date = $input['date'];
     $event->stime = $input['stime'];
     $event->etime = $input['etime'];
     $event->uid = Auth::user()['uid'];
     if ($input['returnlist']) {
         EventItemController::submitItems($event->eid);
     }
     if ($input['email-list']) {
         $this->splitEmails($event->eid);
     }
     try {
         $saveflag = Event::saveEvent($event);
     } catch (Exception $e) {
         print '<script type="text/javascript">';
         print 'alert("The system has encountered an error please try again later")';
         print '</script>';
         return view('errors.error_event');
     }
     foreach ($itemslist as $item) {
         array_push($items, $item);
     }
     $chat_messages = MessageController::getMessagesFromEid($eid);
     self::sendAllChangeNotifications($eid);
     return redirect("/event/" . $eid . "")->with('event', $event)->with('all_options', $all_poll_options)->with('items_list', $items)->with('invites', $invites)->with('chat_messages', $chat_messages);
 }
開發者ID:umSoftEng2GrpE,項目名稱:partEZ,代碼行數:41,代碼來源:EventController.php

示例5: getEventItems

 public function getEventItems($eid)
 {
     return Event::getEventItems($eid);
 }
開發者ID:maxewaschuk,項目名稱:partEZ,代碼行數:4,代碼來源:EventItemController.php


注:本文中的app\Event::getEventItems方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。