本文整理汇总了PHP中app\models\Activity::getNextActivity方法的典型用法代码示例。如果您正苦于以下问题:PHP Activity::getNextActivity方法的具体用法?PHP Activity::getNextActivity怎么用?PHP Activity::getNextActivity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Activity
的用法示例。
在下文中一共展示了Activity::getNextActivity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: min
$navItems = [['label' => 'Home', 'url' => ['/site/index']], ['label' => 'Outside Attraction', 'url' => ['/outside-attraction/index']], ['label' => 'Schedule', 'url' => ['/activity/index']], ['label' => 'Login', 'url' => ['/site/login']]];
} else {
$navItems = [['label' => 'User', 'url' => ['/user/index'], 'visible' => Yii::$app->user->can('userIndex')], ['label' => 'Schedule', 'url' => ['/activity/index']], ['label' => 'Outside Attraction', 'url' => ['/outside-attraction/index']], ['label' => 'Forum', 'url' => ['/post/index']], ['label' => 'Feedback', 'url' => ['/survey/index']], ['label' => 'Attendance', 'url' => ['/activity/record'], 'visible' => Yii::$app->user->can('activityRecord')], ['label' => 'Announcement', 'url' => ['/announcement/index'], 'visible' => Yii::$app->user->can('announcementIndex')], ['label' => 'Venue Management', 'items' => [['label' => 'Venue', 'url' => ['/venue/index'], 'visible' => Yii::$app->user->can('venueIndex')], ['label' => 'Venue Type', 'url' => ['/venue-type/index'], 'visible' => Yii::$app->user->can('venueTypeIndex')]], 'visible' => Yii::$app->user->can('venueIndex')], ['label' => 'Topic/Category Management', 'items' => [['label' => 'Topic', 'url' => ['/topic/index'], 'visible' => Yii::$app->user->can('topicIndex')], ['label' => 'Category', 'url' => ['/category/index'], 'visible' => Yii::$app->user->can('categoryIndex')]], 'visible' => Yii::$app->user->can('topicIndex')], ['label' => 'Coupon', 'url' => ['/coupon/index']], ['label' => 'Speaker Display', 'url' => ['/user-bibi/index'], 'visible' => Yii::$app->user->can('userBibiIndex')], ['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]];
}
echo Nav::widget(['options' => ['class' => 'navbar-nav'], 'items' => $navItems]);
if (Yii::$app->user->can('qrCodeGenerate')) {
//processing qr code data
$errorCorrectionLevel = 'L';
$matrixPointSize = 4;
if (isset($_REQUEST['level']) && in_array($_REQUEST['level'], array('L', 'M', 'Q', 'H'))) {
$errorCorrectionLevel = $_REQUEST['level'];
}
if (isset($_REQUEST['size'])) {
$matrixPointSize = min(max((int) $_REQUEST['size'], 1), 10);
}
$activity = \app\models\Activity::getNextActivity();
if (!Yii::$app->user->isGuest && $activity != false) {
// user data
QRcode::png('https://comp3421-3-ansonmouse1-1.c9users.io/web/index.php?r=participant-has-activity/attend&id=' . Yii::$app->user->identity->getId() . '&activity=' . $activity['id'] . '&user=admin&token=admin', $filename, $errorCorrectionLevel, $matrixPointSize, 2);
echo '<div class="qrCode">
<img src="' . $PNG_WEB_DIR . basename($filename) . '"><br>
Token for activity at<br> ' . $activity['startDatetime'] . '
</div>';
}
}
NavBar::end();
if (!Yii::$app->user->isGuest) {
echo '<div class="notification-dropdown-container">
<button class="btn btn-default dropdown-toggle" type="button" id="notification-btn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="glyphicon glyphicon-inbox" aria-hidden="true"></span>
<span class="badge" id="notification-counter"></span>