yii2tech\admin\actions\Action::findModel PHP Метод

findModel() публичный Метод

If the data model is not found, a 404 HTTP exception will be raised.
public findModel ( string $id ) : yii\db\ActiveRecordInterface | Model
$id string the ID of the model to be loaded. If the model has a composite primary key, the ID must be a string of the primary key values separated by commas. The order of the primary key values should follow that returned by the `primaryKey()` method of the model.
Результат yii\db\ActiveRecordInterface | yii\base\Model the model found
    public function findModel($id)
    {
        if ($this->findModel !== null) {
            return call_user_func($this->findModel, $id, $this);
        } elseif ($this->controller->hasMethod('findModel')) {
            return call_user_func([$this->controller, 'findModel'], $id, $this);
        } else {
            throw new InvalidConfigException('Either "' . get_class($this) . '::findModel" must be set or controller must declare method "findModel()".');
        }
    }