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