Skip to content
Advertisement

Tag: yii2

yii2 double gridview in a form

I have 2 gridview in a form and from them I have to extract selectedrows, which I did with ‘class’ => ‘kartikgridCheckboxColumn’. In a controller receive the selected values in a selection[] variable. Here comes the problem. The selection[] variable brings the selection of the 2 gridViews. Ex: array (size=2) 0 => string ’10’ (length=2) 1 => string ’44’ (length=2)

Yii2 Migration move data to other table

I have table: and I have created table I want to move some data(date_used & used_by_user_id) from table ticket to other table used with migration yii2 in the query. But I don’t know how to do it without ActiveRecord & array. Answer Only sql. Yii-migration not supported select in the insert into

Kartik export menu showing incompatible error message

I’m using kartik export menu and it’s showing the error below. PHP Strict Warning – yiibaseErrorException kartikgridGridView and kartikbaseBootstrapTrait define the same property ($bsVersion) in the composition of kartikgridGridView. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed Code: What can be the cause of this since i’ve followed the kartik instructions

Yii2 ArrayDataProvider does not show already paginated data

I have an issue with ArrayDataProvider object that Yii2 provides. I have a huge API call that returns more than 7k items (this is a problem because obtaining all items takes a long time). I realized that I can tell the API to paginate for me so I was trying to implement the already paginated data into an ArrayDataProvider but

Yii2: How to redirect to with UrlManager?

In my Yii2 config I have: If I go to site.com/search it works. If I go to site.com/site/index it also works and shows the same content. How to redirect the call instead of just showing the response of site/index? It must also redirect with params (site.com/site/index?param=1 -> site.com/search?param=1) Answer The UrlManager does not redirect. It rather does a rewrite like

Advertisement