Commit c46b35b1 by Carsten Brandt

allow configuring asset converter property with default class

parent e3e26540
...@@ -156,6 +156,9 @@ class AssetManager extends Component ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment