本文整理汇总了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();
}
示例2: init
public function init()
{
parent::init();
//$this->js[] = 'script.js';
$this->css[] = 'css/pane.css';
$this->css[] = 'css/checkout.css';
}
示例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);
};
}
示例4: init
public function init()
{
parent::init();
$this->sourcePath = __DIR__ . DIRECTORY_SEPARATOR . 'source';
$this->depends[] = JqueryAsset::className();
$this->depends[] = BootstrapThemeAsset::className();
}
示例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();
}
示例6: init
/**
* @inheritdoc
*/
public function init()
{
$postfix = YII_DEBUG ? '' : '.min';
$this->css[] = 'summernote.css';
$this->js[] = 'summernote' . $postfix . '.js';
parent::init();
}
示例7: init
public function init()
{
parent::init();
$this->sourcePath = __DIR__ . '/assets';
$this->setupAssets('css', ['css/blockmodels']);
$this->setupAssets('js', ['js/blockmodels']);
}
示例8: init
public function init()
{
parent::init();
if ($this->sourcePath == null) {
$this->sourcePath = __DIR__ . DIRECTORY_SEPARATOR . 'assets';
}
}
示例9: init
public function init()
{
$this->js[] = 'ckeditor.js';
//?v=' . microtime();
$this->js[] = 'ckeditor.sample.init.js?v=' . microtime();
parent::init();
}
示例10: init
public function init()
{
parent::init();
$this->publishOptions['beforeCopy'] = function ($from, $to) {
return strpos($from, 'fonts') !== false || strpos($from, 'css') !== false;
};
}
示例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.');
}
}
示例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();
}
示例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();
}
示例14: init
public function init()
{
$this->basePath = __DIR__ . '/assets';
list(, $url) = Yii::$app->assetManager->publish(__DIR__ . '/assets');
$this->baseUrl = $url;
parent::init();
}
示例15: init
/**
* @inheritdoc
*/
public function init()
{
$postfix = YII_DEBUG ? '' : '.min';
$this->js[] = 'jstree' . $postfix . '.js';
$this->css[] = 'themes/default/style' . $postfix . '.css';
parent::init();
}