public static function addCss($view, $cssfile) { $view->registerCssFile($cssfile, [AppAsset::className(), 'depends' => 'backend\\assets\\AppAsset']); }
<?php use agent\assets\AppAsset; use yii\widgets\ActiveForm; use yii\widgets\LinkPager; use yii\helpers\Html; use yii\helpers\Url; /* @var $this yii\web\View */ $this->registerMetaTag(['name' => 'keywords', 'content' => '商品属性']); $this->registerMetaTag(['name' => 'description', 'content' => '商品属性'], 'description'); $this->title = '代理系统-商品属性'; $this->params['breadcrumbs'][] = '商品管理'; $this->params['breadcrumbs'][] = '商品属性'; AppAsset::register($this); AppAsset::addScript($this, '@web/js/plugins/validate/jquery.validate.min.js'); ?> <div class="wrapper wrapper-content"> <div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-title"> <h5>商品属性</h5> <?php if (Yii::$app->getSession()->hasFlash('info')) { echo '<p class="label label-primary sflash">' . Yii::$app->getSession()->getFlash('info') . '</p>'; } ?> </div> <div class="ibox-content"> <div class="row">
<?php use agent\assets\AppAsset; use yii\helpers\Html; use yii\widgets\Breadcrumbs; use yii\bootstrap\Nav; use yii\bootstrap\NavBar; /* @var $this \yii\web\View */ /* @var $content string */ use agent\components\NavWidget; AppAsset::register($this); $session = Yii::$app->session; $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); ?>