PHP Class yii\rest\IndexAction

For more details and usage information on IndexAction, see the guide article on rest controllers.
Since: 2.0
Author: Qiang Xue ([email protected])
Inheritance: extends Action
Show file Open project: yiisoft/yii2 Class Usage Examples

Public Properties

Property Type Description
$prepareDataProvider a PHP callable that will be called to prepare a data provider that should return a collection of the models. If not set, IndexAction::prepareDataProvider will be used instead. The signature of the callable should be: php function ($action) { $action is the action object currently running } The callable should return an instance of [[ActiveDataProvider]].

Public Methods

Method Description
run ( ) : ActiveDataProvider

Protected Methods

Method Description
prepareDataProvider ( ) : ActiveDataProvider Prepares the data provider that should return the requested collection of the models.

Method Details

prepareDataProvider() protected method

Prepares the data provider that should return the requested collection of the models.
protected prepareDataProvider ( ) : ActiveDataProvider
return yii\data\ActiveDataProvider

run() public method

public run ( ) : ActiveDataProvider
return yii\data\ActiveDataProvider

Property Details

$prepareDataProvider public property

a PHP callable that will be called to prepare a data provider that should return a collection of the models. If not set, IndexAction::prepareDataProvider will be used instead. The signature of the callable should be: php function ($action) { $action is the action object currently running } The callable should return an instance of [[ActiveDataProvider]].
public $prepareDataProvider