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


PHP AppAsset::addScript方法代码示例

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


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

示例1:

<?php

use yii\helpers\Html;
use common\helpers\Common;
use backend\widgets\LinkPager;
use backend\widgets\Delete;
use yii\helpers\Url;
use backend\assets\AppAsset;
AppAsset::addCss($this, '@web/css/select2.css');
AppAsset::addScript($this, '@web/js/jquery.uniform.js');
AppAsset::addScript($this, '@web/js/select2.min.js');
AppAsset::addScript($this, '@web/js/unicorn.js');
AppAsset::addScript($this, '@web/js/jquery.dataTables.min.js');
AppAsset::addScript($this, '@web/js/unicorn.tables.js');
$this->params = ['breadcrumb' => [['name' => '素材管理', 'url' => '#', 'current' => 0], ['name' => '本地素材', 'url' => '#', 'current' => 1]]];
?>
<div class="row-fluid">
<div class="span12">
	<div class="widget-box">
		<div class="widget-title">
			<span class="icon">
				<i class="icon-th"></i>
			</span>
			<h5>本地素材列表</h5>
		</div>
		<div class="widget-content">
			<table class="table table-bordered table-striped with-check">
				<thead>
					<tr>
						<th><input type="checkbox" id="title-table-checkbox" name="title-table-checkbox" /></th>
						<th>文件名</th>
开发者ID:RoyZeng,项目名称:weimp,代码行数:31,代码来源:index.php

示例2: intval

<?php

use backend\widgets\Delete;
use yii\helpers\Url;
use backend\assets\AppAsset;
AppAsset::addCss($this, '@web/css/select2.css');
AppAsset::addScript($this, '@web/js/jquery.uniform.js');
AppAsset::addScript($this, '@web/js/select2.min.js');
AppAsset::addScript($this, '@web/js/unicorn.js');
AppAsset::addScript($this, '@web/js/jquery.dataTables.min.js');
AppAsset::addScript($this, '@web/js/unicorn.tables.js');
AppAsset::addScript($this, '@web/js/custom-menus/custommenus.js');
$fid = intval(Yii::$app->request->get('fid', 0));
if ($fid) {
    $this->params = ['breadcrumb' => [['name' => '一级菜单【' . $parent_menu['title'] . '】', 'url' => Url::to(['custom-menus/index', 'pid' => Yii::$app->controller->pid]), 'current' => 0], ['name' => '二级菜单', 'url' => '#', 'current' => 1]]];
} else {
    $this->params = ['breadcrumb' => [['name' => '一级菜单', 'url' => '#', 'current' => 1]]];
}
?>
<div class="row-fluid">
<div class="span12">
	<div class="widget-box">
		<div class="widget-title">
			<span class="icon">
				<i class="icon-th"></i>
			</span>
			<h5>自定义菜单列表</h5>
			<a class="btn btn-info label" href="<?php 
echo Url::to(['custom-menus/form', 'pid' => Yii::$app->controller->pid, 'fid' => $fid]);
?>
">创建</a>
开发者ID:RoyZeng,项目名称:weimp,代码行数:31,代码来源:index.php

示例3:

<?php

use backend\assets\AppAsset;
use yii\widgets\ActiveForm;
use yii\widgets\LinkPager;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
/* @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>
	        </div>

            <div class="ibox-content">
                <div class="row">
                    <div class="col-sm-9 m-b-xs tooltip-demo">
                        <a href="<?php 
echo Url::toRoute(['brandlist']);
?>
开发者ID:dlpc,项目名称:yii2-plane,代码行数:31,代码来源:brandadd.php

示例4:

<?php

use yii\helpers\Html;
use yii\helpers\Url;
use backend\assets\AppAsset;
AppAsset::addCss($this, '@web/css/select2.css');
AppAsset::addScript($this, '@web/js/jquery.uniform.js');
AppAsset::addScript($this, '@web/js/select2.min.js');
AppAsset::addScript($this, '@web/js/unicorn.js');
AppAsset::addScript($this, '@web/js/jquery.tmpl.min.js');
AppAsset::addScript($this, '@web/js/forever-material/forevermaterial.js');
$action = 'create';
$op_text = '创建';
$this->params = ['breadcrumb' => [['name' => '素材管理', 'url' => '#', 'current' => 0], ['name' => '永久素材', 'url' => Url::to(['forever-material/index', 'pid' => Yii::$app->controller->pid]), 'current' => 0], ['name' => $op_text . '永久素材', 'url' => '#', 'current' => 1]]];
?>
<div class="row-fluid">
	<div class="span12">
		<div class="widget-box">
			<div class="widget-title">
				<span class="icon">
					<i class="icon-align-justify"></i>								
				</span>
				<h5>创建永久素材</h5>
			</div>
			<div class="widget-content nopadding">
				<form action="<?php 
echo Url::to(['forever-material/' . $action]);
?>
" method="post" class="form-horizontal" enctype="multipart/form-data" />
					<div class="control-group">
						<label class="control-label">素材名称</label>
开发者ID:RoyZeng,项目名称:weimp,代码行数:31,代码来源:form.php


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