The response headers and content. I suppose it would somehow have to be converted to DataProvider or Array.
The response headers and content. I suppose it would somehow have to be converted to DataProvider or Array.
I managed it with (as I remember):
//Controller
$array = yii\web\response::$headers->toArray();
$array[‘content’] = yii\web\response::$content;
$dataProvider = yii\data\ArrayDataProvider::$models = $array;
//View
yii\widgets\ListView::$dataProvider = $dataProvider;
yii\widgets\ListView::$viewParams
But I finally decided that, as yii\web\response is a string, to just nl2br($response) in the view. And dismiss ListView altogether.