本文整理汇总了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>