本文整理汇总了PHP中app\models\Course::levelList方法的典型用法代码示例。如果您正苦于以下问题:PHP Course::levelList方法的具体用法?PHP Course::levelList怎么用?PHP Course::levelList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Course
的用法示例。
在下文中一共展示了Course::levelList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
use app\models\Course;
use app\models\UserCourse;
use app\models\Category;
$directionAliasFlipList = Category::directionAliasFlipList();
$directionList = Category::directionList();
$levelList = Course::levelList();
?>
<html xmlns:wb="http://open.weibo.com/wb">
<script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js" type="text/javascript" charset="utf-8"></script>
<div class="col-lg-12">
<ol class="breadcrumb">
<li><a href="/course/list"><?php echo Yii::t('app', 'Course')?></a></li>
<li><a href="/course/list?c=<?php echo $directionAliasFlipList[$categoryModel->direction];?>"><?php echo $directionList[$categoryModel->direction];?></a></li>
<li><a href='/course/list?c=<?php echo $categoryModel->alias;?>'><?php echo $categoryModel->name;?></a></li>
<li class="active"><?php echo $course->name;?></li>
</ol>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 course-view-title">
<h2><?php echo $course->name;?></h2>
</div>
<div class="col-lg-3 col-md-3 col-xs-3 course-view-class">
<dl>
<h4><dt><?php echo $levelList[$course->difficulty_level]?></dt></h4>
<dd><?php echo Yii::t('app', 'Level');?></dd>
</dl>
示例2: if
<li role="menu" ><a href="/course/list?c=<?php echo $category->alias;?>&is_easy=<?php echo $is_easy?>"><?php echo $category->name;?></a></li>
<?php endif;?>
<?php endforeach;?>
</ul>
<hr>
</div>
<div class="row">
<p class="col-lg-1 col-md-1 col-sm-2 list-query-type"><?php echo Yii::t('app', 'Level');?>:</p>
<ul class="col-lg-11 col-md-11 col-sm-10 nav nav-pills">
<?php if ($activeDifficulty == '') : ?>
<li role="menu" ><a href="/course/list?c=<?php echo $c;?>" class="gray"><?php echo Yii::t('app', 'All');?></a></li>
<?php else : ?>
<li role="menu" ><a href="/course/list?c=<?php echo $c;?>" ><?php echo Yii::t('app', 'All');?></a></li>
<?php endif;?>
<?php foreach (Course::levelList() as $k => $v) : ?>
<?php if ($k == $activeDifficulty) : ?>
<li role="menu" ><a href="/course/list?c=<?php echo $c;?>&is_easy=<?php echo $k;?>" class="gray"><?php echo $v;?></a></li>
<?php else : ?>
<li role="menu" ><a href="/course/list?c=<?php echo $c;?>&is_easy=<?php echo $k;?>"><?php echo $v;?></a></li>
<?php endif;?>
<?php endforeach;?>
</ul>
<hr>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<ul class="nav nav-tabs">