This method is mainly used to collect tabular data input.
The data to be loaded for each model is $data[formName][index], where formName
refers to the value of Model::formName, and index the index of the model in the $models array.
If Model::formName is empty, $data[index] will be used to populate each model.
The data being populated to each model is subject to the safety check by Model::setAttributes.
public static loadMultiple ( array $models, array $data, string $formName = null ) : boolean | ||
$models | array | the models to be populated. Note that all models should have the same class. |
$data | array | the data array. This is usually `$_POST` or `$_GET`, but can also be any valid array supplied by end user. |
$formName | string | the form name to be used for loading the data into the models. If not set, it will use the [[formName()]] value of the first model in `$models`. This parameter is available since version 2.0.1. |
return | boolean | whether at least one of the models is successfully populated. |