Commit be006d5f authored by thomas craipeau's avatar thomas craipeau
Browse files

assetManager yii2 et console asset

parent 55e21daa
......@@ -29,9 +29,11 @@ class NewsModule extends \yii\base\Module {
public function getAssetsUrl()
{
if ($this->_assetsUrl === null)
$this->_assetsUrl = Yii::app()->getAssetManager()->publish(
if ($this->_assetsUrl === null) {
Yii::$app->getAssetManager()->publish(
Yii::getPathOfAlias($this->id.'.assets') );
$this->_assetsUrl = Yii::$app->getAssetManager()->getPublishedUrl(Yii::getPathOfAlias($this->id.'.assets'));
}
return $this->_assetsUrl;
}
......
Supports Markdown
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