Пример #1
0
 public function indexAction()
 {
     $this->forceInsecure();
     // Pull podcasts.
     $podcasts = Podcast::fetchLatest();
     $this->view->podcasts = $podcasts;
     // Pull large photos and news for rotator.
     $network_news = NetworkNews::fetchFeatured();
     $this->view->network_news = $network_news;
     // Pull stations and calendar events.
     $this->_initStations();
     $this->_initEvents();
     // Pull conventions.
     $conventions = Convention::getAllConventions();
     $this->view->conventions_upcoming = $conventions['upcoming'];
     $this->view->conventions_archived = $conventions['archived'];
     /*
     // Pull rotators.
     $rotators = Rotator::fetch();
     $this->view->rotators = $rotators;
     */
     // Special event flagging and special formatting.
     $special_event = \PVL\Utilities::showSpecialEventsMode();
     $this->view->special_event = $special_event;
     if ($special_event) {
         $autoplay_station = Settings::getSetting('special_event_station_id', 0);
         if ($autoplay_station != 0) {
             $this->view->station_id = $autoplay_station;
             $this->view->autoplay = true;
         }
         $this->view->special_event_embed = trim(Settings::getSetting('special_event_embed_code'));
         $this->view->special_chat_embed = trim(Settings::getSetting('special_event_chat_code'));
     }
     $this->view->autoplay = (bool) $this->getParam('autoplay', true);
 }