mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-16 14:29:30 +08:00
view did not use the correct assetmanager
This commit is contained in:
@@ -373,7 +373,7 @@ class View extends \yii\base\View
|
|||||||
if (empty($depends)) {
|
if (empty($depends)) {
|
||||||
$this->cssFiles[$key] = Html::cssFile($url, $options);
|
$this->cssFiles[$key] = Html::cssFile($url, $options);
|
||||||
} else {
|
} else {
|
||||||
$am = Yii::$app->getAssetManager();
|
$am = $this->getAssetManager();
|
||||||
$am->bundles[$key] = new AssetBundle([
|
$am->bundles[$key] = new AssetBundle([
|
||||||
'css' => [Url::to($url)],
|
'css' => [Url::to($url)],
|
||||||
'cssOptions' => $options,
|
'cssOptions' => $options,
|
||||||
@@ -435,7 +435,7 @@ class View extends \yii\base\View
|
|||||||
unset($options['position']);
|
unset($options['position']);
|
||||||
$this->jsFiles[$position][$key] = Html::jsFile($url, $options);
|
$this->jsFiles[$position][$key] = Html::jsFile($url, $options);
|
||||||
} else {
|
} else {
|
||||||
$am = Yii::$app->getAssetManager();
|
$am = $this->getAssetManager();
|
||||||
$am->bundles[$key] = new AssetBundle([
|
$am->bundles[$key] = new AssetBundle([
|
||||||
'js' => [Url::to($url)],
|
'js' => [Url::to($url)],
|
||||||
'jsOptions' => $options,
|
'jsOptions' => $options,
|
||||||
|
|||||||
Reference in New Issue
Block a user