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


PHP AppAsset::register方法代码示例

本文整理汇总了PHP中frontend\assets\AppAsset::register方法的典型用法代码示例。如果您正苦于以下问题:PHP AppAsset::register方法的具体用法?PHP AppAsset::register怎么用?PHP AppAsset::register使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在frontend\assets\AppAsset的用法示例。


在下文中一共展示了AppAsset::register方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     parent::init();
     $geo = new \jisoft\sypexgeo\Sypexgeo();
     $res = $geo->get();
     $request = \Yii::$app->request->getQueryParams();
     $category = Category::find()->byUrl(ArrayHelper::getValue($request, Category::URL_PARAM_CATEGORY))->one();
     $subcategory = Category::find()->byUrl(ArrayHelper::getValue($request, Category::URL_PARAM_SUBCATEGORY))->one();
     $rubric = Category::find()->byUrl(ArrayHelper::getValue($request, Category::URL_PARAM_RUBRIC))->one();
     $this->view->params = ['bundle' => AppAsset::register($this->view), 'categories' => Category::getMain(), 'countryEn' => $res['country']['name_en'], 'category' => $category, 'subcategory' => $subcategory, 'rubric' => $rubric];
 }
开发者ID:ninetor,项目名称:yii-classifield,代码行数:11,代码来源:BaseController.php

示例2:

<?php

/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;
AppAsset::register($this);
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="<?php 
echo Yii::$app->language;
?>
">
<head>
    <meta charset="<?php 
echo Yii::$app->charset;
?>
">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php 
echo Html::csrfMetaTags();
?>
    <title><?php 
echo Html::encode($this->title);
?>
</title>
开发者ID:vihanga-liyanage,项目名称:feed-cloud,代码行数:31,代码来源:main.php

示例3:

<?php

use yii\helpers\Html;
use dosamigos\ckeditor\CKEditor;
use yii\widgets\ActiveForm;
use kartik\date\DatePicker;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \frontend\models\ProfileForm */
$this->title = $model->username;
$this->params['breadcrumbs'][] = ['label' => 'Profile', 'url' => ['update']];
$this->params['breadcrumbs'][] = $this->title;
\frontend\assets\AppAsset::register($this);
?>


<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" />
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css" rel="stylesheet" />


<script type="text/javascript"
        src="https://maps.googleapis.com/maps/api/js?sensor=true&libraries=places">
</script>

<div class="site-profile">
    <h1><?php 
echo Html::encode($this->title);
?>
开发者ID:praveen-tissera,项目名称:Horsebuzz,代码行数:31,代码来源:profile.php

示例4:

<?php

use yii\helpers\Html;
use yii\helpers\Url;
use frontend\assets\AppAsset;
/* @var $this yii\web\View */
$this->title = '【骑行中国-二手自行车出售信息】';
$this->params['bodyClass'] = 'buy';
$bundle = AppAsset::register($this);
?>

<div class="section-filter container">
	<div class="filter-box">
		<dl class="filter">
			<dt>品牌:</dt>
			<dd>
				<a href="/all" class="on" >不限</a>
				<a href="/jieante">捷安特</a>
				<a href="/meilida">美利达</a>
				<a href="/yongjiu">永久</a>
				<a href="/yongjiu">飞鸽</a>
				<a href="/yongjiu">凤凰</a>
			</dd>
		</dl>

		<dl class="filter">
			<dt>类型:</dt>
			<dd>
				<a href="/all" class="on" >不限</a>
				<a href="/jieante">山地车</a>
				<a href="/meilida">公路车</a>
开发者ID:xitengfei,项目名称:cycling,代码行数:31,代码来源:index.php

示例5:

<?php

use frontend\assets\AppAsset;
/* @var $this yii\web\View */
/* @var $products \common\models\Product[] */
$this->title = 'zzz mainpage';
$bundle = $this->params['bundle'] = AppAsset::register($this);
?>

<div class="content">
    <div class="wr">
        <a href="" class="mob-show-cacatol"><span></span> Show catalog categories</a>
        <?php 
echo $this->render('_menu');
?>
        <?php 
echo $this->render('_specials', ['products' => $products, 'banners' => $banners]);
?>
        <div class="clearfix"></div>
        <div class="footer-baner container-fluid">
            <div class="row">
                <div class="col-xs-4">
                    <span class="foot-ban-img"><img src="/uploads/banners/<?php 
echo $advantages[0]['img'];
?>
" alt=""></span>
                            <span class="foot-ban-text">
                                <h3><a href=""><?php 
echo $advantages[0]['title'];
?>
</a></h3>
开发者ID:ninetor,项目名称:yii-classifield,代码行数:31,代码来源:index.php


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