mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-13 02:37:38 +01:00
Global DOCS update: ~~~ replaced with ```
This commit is contained in:
@@ -22,7 +22,7 @@ use yii\di\Instance;
|
||||
*
|
||||
* The following is an example of using ActiveDataProvider to provide ActiveRecord instances:
|
||||
*
|
||||
* ~~~
|
||||
* ```php
|
||||
* $provider = new ActiveDataProvider([
|
||||
* 'query' => Post::find(),
|
||||
* 'pagination' => [
|
||||
@@ -32,12 +32,12 @@ use yii\di\Instance;
|
||||
*
|
||||
* // get the posts in the current page
|
||||
* $posts = $provider->getModels();
|
||||
* ~~~
|
||||
* ```
|
||||
*
|
||||
* And the following example shows how to use ActiveDataProvider without ActiveRecord:
|
||||
*
|
||||
* ~~~
|
||||
* $query = new Query;
|
||||
* ```php
|
||||
* $query = new Query();
|
||||
* $provider = new ActiveDataProvider([
|
||||
* 'query' => $query->from('post'),
|
||||
* 'pagination' => [
|
||||
@@ -47,7 +47,7 @@ use yii\di\Instance;
|
||||
*
|
||||
* // get the posts in the current page
|
||||
* $posts = $provider->getModels();
|
||||
* ~~~
|
||||
* ```
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
|
||||
Reference in New Issue
Block a user