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


PHP AppAsset::register方法代码示例

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


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

示例1:

<?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 app\assets\AppAsset;
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>
    <?php 
开发者ID:Andrew-Yanovich,项目名称:orderprocessing,代码行数:31,代码来源:main.php

示例2:

<?php

use app\assets\AppAsset;
use yii\helpers\Html;
/* @var $this \yii\web\View */
/* @var $content string */
if (class_exists('backend\\assets\\AppAsset')) {
    backend\assets\AppAsset::register($this);
} else {
    app\assets\AppAsset::register($this);
}
dmstr\web\AdminLteAsset::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);
?>
开发者ID:kdes70,项目名称:hotel.lok,代码行数:31,代码来源:main-login.php

示例3:

<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\ActiveForm;
use app\models\Users;
use app\assets\AppAsset;
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model app\models\LoginForm */
$this->title = 'Class List';
// $this->params['breadcrumbs'][] = $this->title;
$bundle = AppAsset::register($this);
?>
<div class="site-list">
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a('Create Users', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'StudentNumber', 'FirstName', 'MiddleName', 'LastName', 'ClassSection', ['class' => 'yii\\grid\\ActionColumn']]]);
开发者ID:raguila,项目名称:islc,代码行数:31,代码来源:list.php

示例4:

<?php

use yii\helpers\Html;
use yii\helpers\Url;
use app\assets\AppAsset;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\widgets\Alert;
use app\helpers\Bugitor;
AppAsset::register($view);
$view->beginPage();
开发者ID:jacmoe,项目名称:bugitor,代码行数:12,代码来源:_top.php

示例5: registerClientScript

 /**
  *
  */
 public function registerClientScript()
 {
     $view = $this->getView();
     if ($this->language !== null) {
         $this->clientOptions['locale'] = $this->language;
         AppAsset::register($view)->js[] = $this->localePath . $this->language . '.js';
     } else {
         AppAsset::register($view);
     }
     $id = $this->options['id'];
     $selector = "jQuery('#{$id}')";
     if (strpos($this->template, '{button}') !== false) {
         $selector .= ".parent()";
     }
     $options = !empty($this->clientOptions) ? Json::encode($this->clientOptions) : '';
     $js[] = "{$selector}.datetimepicker({$options});";
     if (!empty($this->clientEvents)) {
         foreach ($this->clientEvents as $event => $handler) {
             $js[] = "{$selector}.on('{$event}', {$handler});";
         }
     }
     $view->registerJs(implode("\n", $js));
 }
开发者ID:lebeddima,项目名称:booking2,代码行数:26,代码来源:DateTimePicker.php

示例6: init

 public function init()
 {
     AppAsset::register($this->getView());
     NotifyJsAsset::register($this->getView());
 }
开发者ID:vfokov,项目名称:tims2,代码行数:5,代码来源:Controller.php


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