MINOR Use injector to create controllers in ModelAsController

This commit is contained in:
Marcus Nyeholt 2012-05-30 15:09:25 +10:00
parent ad28780959
commit 9f51c87884

View File

@ -24,7 +24,7 @@ class ModelAsController extends Controller implements NestedController {
$controller = $controller . '_' . ucfirst($action);
}
return class_exists($controller) ? new $controller($sitetree) : $sitetree;
return class_exists($controller) ? Injector::inst()->create($controller, $sitetree) : $sitetree;
}
public function init() {