本文整理汇总了PHP中YII::getAlias方法的典型用法代码示例。如果您正苦于以下问题:PHP YII::getAlias方法的具体用法?PHP YII::getAlias怎么用?PHP YII::getAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类YII
的用法示例。
在下文中一共展示了YII::getAlias方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveCoupon
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\MasterCategory;
use yii\helpers\Url;
?>
<script src="<?php
echo YII::getAlias("@js_url");
?>
/bootstrap-select.js"></script>
<script>
$('.selectpicker').selectpicker();
function saveCoupon()
{
categoryName = $("#mastercategory-category_name").val();
flag = 0;
if(couponName=='')
{
$("#category_name").html("Coupon name cannot be blank.");
flag++;
}
if(flag==0)
{
$.ajax({
url : "<?php
echo Url::toRoute("/category/add-category");
?>
",
type : 'post',
示例2:
</title>
<?php
$this->head();
?>
</head>
<body>
<?php
$this->beginBody();
?>
<div class="userdashboard-page">
<div class="dashboard_side">
<header role="banner" class="navbar dashboard_menu">
<div class="navbar-header">
<a href="index.php"> <img alt="logo" src="<?php
echo YII::getAlias('@images_url');
?>
/footer-logo.png" class="img-responsive" /> </a>
</div>
<div class="clearfix"></div>
<div class="side-collapse in">
<nav role="navigation" class="navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="javascript:void(0);"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li><a href="javascript:void(0);"><i class="fa fa-align-justify"></i> My Experiences</a></li>
<li><a href="javascript:void(0);"><i class="fa fa-sliders"></i> My Opinions</a></li>
<li><a href="javascript:void(0);"><i class="fa fa-question-circle"></i> My Questions</a></li>
<li><a href="javascript:void(0);"><i class="fa fa-forumbee"></i> My Forum</a></li>
<li><a href="javascript:void(0);"><i class="fa fa-globe"></i> My Wiki</a></li>
<li><a href="javascript:void(0);"><i class="fa fa-user"></i> My Profile</a></li>
<li><a href="javascript:void(0);"><i class="fa fa-key"></i> Change Password</a></li>
示例3: substr
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<h3 class="hidden-xs">Dashboard</h3>
</div>
<ul class="list-inline right">
<li><a href="<?php
echo Url::toRoute("/home/index");
?>
"> <i class="fa fa-home homeicon"></i> </a> </li>
<li class="usernamepic">
<?php
?>
<!-- <div class="userimg" style="background-image:url(<?php
echo YII::getAlias("@images_url");
?>
/userpic.jpg)"></div>-->
<div class="default_userimg"><?php
echo substr(ucfirst(\Yii::$app->user->identity->username), 0, 1);
?>
</div>
<?php
?>
<span class="name"><?php
echo ucfirst(\Yii::$app->user->identity->username);
?>
</span>
</li>
<li class="logout">
<a href="<?php
示例4:
<?php
app\assets\SnowAssetBundle::register($this);
?>
<p class="inside-snowflakes">OurCRM</p>
<p><?php
echo YII::$app->basePath;
?>
</p>
<p><?php
echo YII::getAlias('@webroot');
?>
</p>
<p><?php
echo YII::getAlias('@vendor');
?>
</p>
<p><?php
echo YII::getAlias('@app');
?>
</p>