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


PHP web\AssetBundle类代码示例

本文整理汇总了PHP中yii\web\AssetBundle的典型用法代码示例。如果您正苦于以下问题:PHP AssetBundle类的具体用法?PHP AssetBundle怎么用?PHP AssetBundle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: initView

 public function initView($view)
 {
     $files = [pathinfo('@nitm/assets/js/jquery-plugins/jquery.ui.widget.js'), pathinfo('@nitm/assets/js/jquery-plugins/jquery-ui-scrollable/jquery-ui-scrollable.js')];
     foreach ($files as $f) {
         $asset = new \yii\web\AssetBundle(['sourcePath' => $f['dirname'], 'js' => [$f['basename']]]);
         $asset->publish($view->getAssetManager());
         $view->assetBundles[static::className() . '\\' . $f['basename']] = $asset;
     }
     return $this;
 }
开发者ID:nhatvuvan,项目名称:yii2-widgets,代码行数:10,代码来源:AjaxWidgetAsset.php

示例2: init

 /**
  * Initialize the widget.
  * 
  * If YII_ENV_DEV is defined, the not minified version of the css and the js files
  * are used.
  * @see \yii\web\AssetBundle::init()
  */
 public function init()
 {
     $this->sourcePath = __DIR__ . '/assets';
     $this->js = ['js/pnotify.custom' . (YII_ENV_DEV ? '.js' : '.min.js')];
     $this->css = ['css/pnotify.custom' . (YII_ENV_DEV ? '.css' : '.min.css')];
     return parent::init();
 }
开发者ID:raoul2000,项目名称:yii2-pnotify-widget,代码行数:14,代码来源:PNotifyAsset.php

示例3: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     $this->setSourcePath('@vendor/branchonline/yii2-select2/assets/select2');
     $this->setupAssets('css', ['select2']);
     $this->setupAssets('js', ['select2.min']);
     parent::init();
 }
开发者ID:branchonline,项目名称:yii2-select2,代码行数:10,代码来源:Select2Asset.php

示例4: init

 public function init()
 {
     parent::init();
     if (!file_exists(\Yii::getAlias('@bower/sticky/jquery.sticky.js'))) {
         throw new InvalidConfigException('You must include `bower-asset/sticky` package in your composer.json configuration file.');
     }
 }
开发者ID:mg-code,项目名称:yii2-assets,代码行数:7,代码来源:StickyAsset.php

示例5: init

 public function init()
 {
     parent::init();
     if ($this->sourcePath == null) {
         $this->sourcePath = __DIR__ . DIRECTORY_SEPARATOR . 'assets';
     }
 }
开发者ID:136216444,项目名称:Yii2-UEditor,代码行数:7,代码来源:UEditorAsset.php

示例6: init

 public function init()
 {
     if (empty($this->js)) {
         $this->js = $this->getJs();
     }
     return parent::init();
 }
开发者ID:songhongyu,项目名称:idaiyan,代码行数:7,代码来源:UeditorAsset.php

示例7: init

 public function init()
 {
     parent::init();
     $this->sourcePath = __DIR__ . DIRECTORY_SEPARATOR . 'source';
     $this->depends[] = JqueryAsset::className();
     $this->depends[] = BootstrapThemeAsset::className();
 }
开发者ID:novokshonovev,项目名称:multi-string-widget,代码行数:7,代码来源:MultiStringAsset.php

示例8: registerAssetFiles

 public function registerAssetFiles($view)
 {
     $nodigitLib = preg_replace('/[0-9]+/', '', $this->library);
     $this->js[] = $this->library . '-editable/js/' . $nodigitLib . '-editable' . (YII_DEBUG ? '.js' : '.min.js');
     $this->css[] = $this->library . '-editable/css/' . $nodigitLib . '-editable.css';
     parent::registerAssetFiles($view);
 }
开发者ID:hiqdev,项目名称:yii2-x-editable,代码行数:7,代码来源:XEditableAsset.php

示例9: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     $postfix = YII_DEBUG ? '' : '.min';
     $this->css[] = 'summernote.css';
     $this->js[] = 'summernote' . $postfix . '.js';
     parent::init();
 }
开发者ID:dlds,项目名称:yii2-summernote,代码行数:10,代码来源:SummernoteAsset.php

示例10: init

 public function init()
 {
     // pr(Yii::$app->view->theme->selectedTheme);die;
     // $this->js = $this->_populateFiles('js');
     // $this->css = $this->_populateFiles('css');
     parent::init();
 }
开发者ID:AppItNetwork,项目名称:yii2-wordpress-themes,代码行数:7,代码来源:WP_ThemeAsset.php

示例11: init

 public function init()
 {
     if (!empty($this->js) && $this->enableLocale && ($language = $this->getLanguage()) !== null) {
         $this->js[] = 'js/locales/bootstrap-datepicker.' . $language . '.min.js';
     }
     parent::init();
 }
开发者ID:filsh,项目名称:yii2-datepicker,代码行数:7,代码来源:DatePickerAsset.php

示例12: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     $postfix = YII_DEBUG ? '' : '.min';
     $this->js[] = 'jstree' . $postfix . '.js';
     $this->css[] = 'themes/default/style' . $postfix . '.css';
     parent::init();
 }
开发者ID:fourteenmeister,项目名称:yii2-tree,代码行数:10,代码来源:TreeAsset.php

示例13: registerAssetFiles

 /**
  * Register language script.
  */
 public function registerAssetFiles($view)
 {
     if ($this->language) {
         $this->js[] = 'locale/bootstrap-markdown.' . $this->language . '.js';
     }
     parent::registerAssetFiles($view);
 }
开发者ID:skoro,项目名称:yii2-admin-template,代码行数:10,代码来源:MarkdownEditorAsset.php

示例14: init

 public function init()
 {
     $this->js[] = 'ckeditor.js';
     //?v=' . microtime();
     $this->js[] = 'ckeditor.sample.init.js?v=' . microtime();
     parent::init();
 }
开发者ID:allhaze,项目名称:renault,代码行数:7,代码来源:CKEditorAsset.php

示例15: init

 public function init()
 {
     parent::init();
     $this->sourcePath = __DIR__ . '/assets';
     $this->setupAssets('css', ['css/blockmodels']);
     $this->setupAssets('js', ['js/blockmodels']);
 }
开发者ID:Jesuso,项目名称:yii2-widget-block-models,代码行数:7,代码来源:BlockModelsAsset.php


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