当前位置: 首页>>代码示例>>PHP>>正文


PHP Course::getChapterList方法代码示例

本文整理汇总了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>
开发者ID:songwanfu,项目名称:SummerNut,代码行数:31,代码来源:view.php

示例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>
开发者ID:songwanfu,项目名称:SummerNut,代码行数:31,代码来源:learn.php


注:本文中的app\models\Course::getChapterList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。