Esempio n. 1
0
 public function get_portal_content()
 {
     $chmod = new ChannelModule();
     $channels = array();
     foreach ($this->ch_ids as $cid) {
         $channel = $chmod->get_by_id($cid);
         switch ($channel->type) {
             case ChannelModel::channel_type_adv:
                 $advmod = new AdvModule();
                 $channel->content = $advmod->get_by_channel($cid, 0, 10);
                 break;
             case ChannelModel::channel_type_talk:
             case ChannelModel::channel_type_activity:
                 $actmod = new ActivityModule();
                 $channel->content = $actmod->get_by_channel($cid, 0, 10);
                 break;
             case ChannelModel::channel_type_talker:
                 $talkermod = new TalkerModule();
                 $channel->content = $talkermod->get_by_channel($cid, 0, 10);
                 break;
         }
         $channels[] = $channel;
     }
     return $channels;
 }