SHARE
TWEET

Untitled

a guest Jul 20th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use yiidataArrayDataProvider;
  2.  
  3. $data = [
  4.     ['id' => 1, 'name' => 'name 1', ...],
  5.     ['id' => 2, 'name' => 'name 2', ...],
  6.     ...
  7.     ['id' => 100, 'name' => 'name 100', ...],
  8. ];
  9.  
  10. $provider = new ArrayDataProvider([
  11.     'allModels' => $data,
  12.     'pagination' => [
  13.         'pageSize' => 10,
  14.     ],
  15.     'sort' => [
  16.         'attributes' => ['id', 'name'],
  17.     ],
  18. ]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top