mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-16 15:21:13 +08:00
allow configuring asset converter property with default class
This commit is contained in:
@ -156,6 +156,9 @@ class AssetManager extends Component
|
|||||||
if ($this->_converter === null) {
|
if ($this->_converter === null) {
|
||||||
$this->_converter = Yii::createObject(AssetConverter::className());
|
$this->_converter = Yii::createObject(AssetConverter::className());
|
||||||
} elseif (is_array($this->_converter) || is_string($this->_converter)) {
|
} elseif (is_array($this->_converter) || is_string($this->_converter)) {
|
||||||
|
if (is_array($this->_converter) && !isset($this->_converter['class'])) {
|
||||||
|
$this->_converter['class'] = AssetConverter::className();
|
||||||
|
}
|
||||||
$this->_converter = Yii::createObject($this->_converter);
|
$this->_converter = Yii::createObject($this->_converter);
|
||||||
}
|
}
|
||||||
return $this->_converter;
|
return $this->_converter;
|
||||||
|
Reference in New Issue
Block a user