Updating plugin to Craft 3: craft()->urlManager->setRouteVariables? What would be the Craft 3 / Yii 2.0 version of
craft()-&gt;urlManager-&gt;setRouteVariables(array('calupdateResponse' =&gt; $out));

This doesn't work (it doesn't complain, either):  

$urlManager = new UrlManager;
$urlManager-&gt;setRouteParams(['calupdateResponse' =&gt; $out]);
Craft::$app-&gt;getUrlManager()-&gt;setRouteParams(['calupdateResponse' =&gt; $out]);


All Components should be treated as singletons, don't create a new instance of them

Note: you can also do

Craft::$app-&gt;urlManager-&gt;setRouteParams(['calupdateResponse' =&gt; $out]);


But it is considered as bad practice 

Edit: most parts of Craft 3 are working with Craft 2 as well... craft() is just a mapper for Craft::$app