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


PHP AssetBundle::init方法代码示例

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


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

示例1: 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

示例2: init

 public function init()
 {
     parent::init();
     //$this->js[] = 'script.js';
     $this->css[] = 'css/pane.css';
     $this->css[] = 'css/checkout.css';
 }
开发者ID:stronglab,项目名称:yii2-checkout,代码行数:7,代码来源:CartAsset.php

示例3: init

 /**
  * Initializes the bundle.
  * Set publish options to copy only necessary files (in this case css and font folders)
  * @codeCoverageIgnore
  */
 public function init()
 {
     parent::init();
     $this->publishOptions['beforeCopy'] = function ($from, $to) {
         return preg_match('%(/|\\\\)(fonts|css)%', $from);
     };
 }
开发者ID:max-wen,项目名称:yii2-app-advanced-autoEnv,代码行数:12,代码来源:AssetBundle.php

示例4: 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

示例5: init

 public function init()
 {
     $this->css[] = YII_DEBUG ? 'vendor/css/bootstrap-datetimepicker.css' : 'vendor/css/bootstrap-datetimepicker.min.css';
     $this->js[] = YII_DEBUG ? 'vendor/js/bootstrap-datetimepicker.js' : 'vendor/js/bootstrap-datetimepicker.min.js';
     $this->js[] = 'bootstrap-editable-datetimepicker.js';
     parent::init();
 }
开发者ID:smallmirror62,项目名称:yii2-editable-widget,代码行数:7,代码来源:EditableDateTimePickerAsset.php

示例6: 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

示例7: 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

示例8: init

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

示例9: 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

示例10: init

 public function init()
 {
     parent::init();
     $this->publishOptions['beforeCopy'] = function ($from, $to) {
         return strpos($from, 'fonts') !== false || strpos($from, 'css') !== false;
     };
 }
开发者ID:SergAHell,项目名称:yii2_etalon,代码行数:7,代码来源:FontAwesomeAsset.php

示例11: 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

示例12: init

 public function init()
 {
     $this->setSourcePath('@rnd/lib/multidatespicker');
     $this->setupAssets('css', ['mdp', 'jquery-ui']);
     $this->setupAssets('js', ['jquery-ui.multidatespicker', 'ui.datepicker-th']);
     parent::init();
 }
开发者ID:pipekung,项目名称:yii2-widgets,代码行数:7,代码来源:MultiDatesPickerAsset.php

示例13: init

 public function init()
 {
     $this->sourcePath = __DIR__ . "/assets";
     $this->css = [YII_DEBUG ? 'css/upload-kit.css' : 'css/upload-kit.min.css'];
     $this->js = [YII_DEBUG ? 'js/upload-kit.js' : 'js/upload-kit.min.js'];
     parent::init();
 }
开发者ID:sonrac,项目名称:yii2-file-kit,代码行数:7,代码来源:UploadAsset.php

示例14: init

 public function init()
 {
     $this->basePath = __DIR__ . '/assets';
     list(, $url) = Yii::$app->assetManager->publish(__DIR__ . '/assets');
     $this->baseUrl = $url;
     parent::init();
 }
开发者ID:miradnan,项目名称:yii2-bootstrap-calendar,代码行数:7,代码来源:CalendarAsset.php

示例15: 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


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