Yii
- 6 ответов
- 0 вопросов
10
Вклад в тег
pageParam
в объекта yii\data\Pagination
$provider_top = new ActiveDataProvider([
'query' => Object::find()->where(['status' => 1])->orderBy(['visits'=>SORT_DESC]),
'pagination' => [
'pageParam' => 'page-top', # <-------------
'pageSize' => 6,
],
]);
$provider_new = new ActiveDataProvider([
'query' => Object::find()->where(['status' => 1])->orderBy(['added_on'=>SORT_DESC]),
'pagination' => [
'pageParam' => 'page-new', # <-------------
'pageSize' => 6,
],
]);
$categories = app\models\Category::findAll();
$data = yii\helpers\ArrayHelper::map($categories, 'id', 'name');
$form->field($model, 'parent_id')->dropDownList($data);
....
'select'=>'js:function( event, ui ) {
// вот тут лежит ID
ui.item.id
}',
....