private function registerComponents($app)
{
foreach ($this->getModules() as $id => $module) {
// set an alias for all user modules
Yii::setAlias('@' . $id, $module->getBasePath());
// see if the module has a registerComponents method
foreach ($module->registerComponents() as $componentId => $definition) {
if (!$app->has($componentId)) {
Yii::trace('Register component ' . $componentId, __METHOD__);
$app->set($componentId, $definition);
}
}
}
}