title: How to pass extra parameter in listview incase of itemView as a function in yii2
body: <p>how to pass extra parameter in listview. incase the itemview as function</p>
  
  <pre><code>&lt;?
  echo ListView::widget( [
  'dataProvider' =&gt; $dataProviderbooking,
  'itemView' =&gt; function ($model, $key, $index, $widget) {
  return $this-&gt;render('_itembookingview',['model' =&gt; $model,'index'=&gt;$index]);
  // or just do some echo
  // return $model-&gt;title . ' posted by ' . $model-&gt;author;
  },
  'viewParams'=&gt;['dataType'=&gt;$dataType],
  ] ); ?&gt;
  </code></pre>
  
  <p>the viewparams is get only the itemview is string type.how to fix this.</p>