當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。