Commit b5f921ee by Carsten Brandt

Update ArrayDataProvider.php

ensure syntax highlighting
parent bea4a74e
...@@ -27,7 +27,7 @@ use yii\helpers\ArrayHelper; ...@@ -27,7 +27,7 @@ use yii\helpers\ArrayHelper;
* *
* ArrayDataProvider may be used in the following way: * ArrayDataProvider may be used in the following way:
* *
* ~~~ * ```php
* $query = new Query; * $query = new Query;
* $provider = new ArrayDataProvider([ * $provider = new ArrayDataProvider([
* 'allModels' => $query->from('post')->all(), * 'allModels' => $query->from('post')->all(),
...@@ -40,7 +40,7 @@ use yii\helpers\ArrayHelper; ...@@ -40,7 +40,7 @@ use yii\helpers\ArrayHelper;
* ]); * ]);
* // get the posts in the current page * // get the posts in the current page
* $posts = $provider->getModels(); * $posts = $provider->getModels();
* ~~~ * ```
* *
* Note: if you want to use the sorting feature, you must configure the [[sort]] property * Note: if you want to use the sorting feature, you must configure the [[sort]] property
* so that the provider knows which columns can be sorted. * so that the provider knows which columns can be sorted.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment