本文整理匯總了PHP中app\models\Course::getChapterList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Course::getChapterList方法的具體用法?PHP Course::getChapterList怎麽用?PHP Course::getChapterList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\models\Course
的用法示例。
在下文中一共展示了Course::getChapterList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
<div class="row view-body">
<div class="col-lg-9 col-md-9 col-sm-9 course-view-body">
<div class="col-lg-12 course-introduction">
<span class="introduction-title"><?php echo Yii::t('app', 'Course Introduction')?></span>
<p><?php echo $course->introduction;?></p>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 course-outline">
<ul class="course-outline-top list-inline">
<li><span class="outline-title"><?php echo Yii::t('app', 'Course Index')?></span></li>
<li><span class="fa fa-play-circle-o"></span><span class="badge"><?php echo $videoCount;?></span></li>
<!-- <li><span class="fa fa-list"></span><span class="badge">2</span></li> -->
</ul>
<ul class="outline-body list-unstyled outline-body">
<?php foreach (Course::getChapterList($course->id) as $chapter): ?>
<li class="col-lg-12 col-md-12 col-sm-12 outline-body-list">
<span class="col-lg-1 col-md-1 col-sm-1 fa fa-list fa-2x "></span>
<h5 class="col-lg-11 col-md-11 col-sm-11"><?php echo $chapter['chapterName'];?></h5>
<?php if (!empty($chapter['chapterIntro'])): ?>
<h6 class="col-lg-11 col-md-11 col-sm-11"><?php echo $chapter['chapterIntro'];?></h6>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 course-comment">
<span class="comment-title"><?php echo Yii::t('app', 'Course Judgement')?></span>
示例2: Resource
<?php
use yii\widgets\LinkPager;
use app\models\Course;
use app\models\Resource;
use app\models\UserCourse;
/* @var $this yii\web\View */
$this->title = Yii::t('app', 'Learn');
$chapterList = Course::getChapterList($course->id);
$resModel = new Resource();
?>
<div class="wrap">
<div class="row course-view-infos">
<?= $this->render('course-top', ['course' => $course, 'categoryModel' => $categoryModel])?>
</div>
<div class="row learn-body">
<div class="col-lg-9 col-md-9 col-sm-9 course-learn-body">
<div class="learn-progress progress">
<?php if ($learnPersent == 0): ?>
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100" style="width: 20%;">
<span >已學<?php echo $learnPersent . '%'?> 用時 <?php echo $learnTimeToal?></span>
</div>
<?php else: ?>
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $learnPersent?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $learnPersent?>%;">
<span >已學<?php echo $learnPersent . '%'?> 用時 <?php echo $learnTimeToal?></span>
</div>