Commit b9b4555d by Qiang Xue

move assetManager to base application.

parent d44e42ab
......@@ -506,6 +506,15 @@ abstract class Application extends Module
}
/**
* Returns the asset manager.
* @return \yii\web\AssetManager the asset manager component
*/
public function getAssetManager()
{
return $this->get('assetManager');
}
/**
* Returns the core application components.
* @see set
*/
......@@ -514,11 +523,12 @@ abstract class Application extends Module
return [
'log' => ['class' => 'yii\log\Dispatcher'],
'errorHandler' => ['class' => 'yii\base\ErrorHandler'],
'view' => ['class' => 'yii\web\View'],
'formatter' => ['class' => 'yii\base\Formatter'],
'i18n' => ['class' => 'yii\i18n\I18N'],
'mail' => ['class' => 'yii\swiftmailer\Mailer'],
'urlManager' => ['class' => 'yii\web\UrlManager'],
'view' => ['class' => 'yii\web\View'],
'assetManager' => ['class' => 'yii\web\AssetManager'],
];
}
......
......@@ -160,15 +160,6 @@ class Application extends \yii\base\Application
}
/**
* Returns the asset manager.
* @return AssetManager the asset manager component
*/
public function getAssetManager()
{
return $this->get('assetManager');
}
/**
* @inheritdoc
*/
public function coreComponents()
......@@ -178,7 +169,6 @@ class Application extends \yii\base\Application
'response' => ['class' => 'yii\web\Response'],
'session' => ['class' => 'yii\web\Session'],
'user' => ['class' => 'yii\web\User'],
'assetManager' => ['class' => 'yii\web\AssetManager'],
], parent::coreComponents());
}
}
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