Answer the question
In order to leave comments, you need to log in
How to pass additional data for item to ActiveDataProvider?
Good afternoon,
maybe someone knows how to pass additional parameters to the ActiveDataProvider.
I now receive an object that has an id, and I pull out x - id and use it in the request to pull the necessary information from the database, but I also have x which is different for each and I need also pass it to ActiveDataProvider / tell me how to do this?
//массив
[
['id' => 1, 'x' => 111],
['id' => 2, 'x' => 222],
['id' => 3, 'x' => 333]
]
По id я забрал все из нужной мне таблицы к примеру User::find()->where('in', 'id', ArrayHelper::getColumns($масств, 'id'))
сунул все в dataProvider
Но тут вопрос как мне передать еще и x в этот дата провайдер для каждого id свой
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question