本文整理汇总了PHP中Video::getLastVideos方法的典型用法代码示例。如果您正苦于以下问题:PHP Video::getLastVideos方法的具体用法?PHP Video::getLastVideos怎么用?PHP Video::getLastVideos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video
的用法示例。
在下文中一共展示了Video::getLastVideos方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index($request)
{
$data = array();
$data['currentPageTitle'] = 'Nouveautés';
$data['vids'] = Video::getLastVideos(50);
return new ViewResponse('news/news', $data);
}
示例2: index
public function index($request)
{
$data = array();
$data['currentPageTitle'] = 'Accueil';
$data['discoverVids'] = Video::getDiscoverVideos(2);
$data['bestVids'] = Video::getBestVideos(6);
if (Session::isActive()) {
$channel = Session::get()->getMainChannel();
$data['subscriptions'] = Session::get()->getSubscribedChannels();
if ($data['subscriptions'] instanceof UserChannel) {
$data['subscriptions'] = [$data['subscriptions']];
}
$data['subscriptions_vids'] = Video::getSubscriptionsVideos(Session::get()->id, 20);
$data['channelId'] = $channel->id;
$data['channelName'] = $channel->name;
$data['avatar'] = $channel->getAvatar();
$data['background'] = $channel->getBackground();
return new ViewResponse('home/logged', $data);
} else {
$data['best_chans'] = UserChannel::getBestChannels();
$data['news_vids'] = Video::getLastVideos();
return new ViewResponse('home/guest', $data);
}
}