Wiki

Sorted by viewsX
Displaying 441-450 of 785 result(s).

Insert a multirow header in CGridView

Created 3 years ago by PeppeHow-tos2 comments – viewed 15,584 times – ( +6 ) – version 1.1
The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way you can write columns grouping headers, and obtain a nicer view.

How to create a simple logout link in the view?

Created 2 years ago by mi.sarahHow-tos0 comments – viewed 15,537 times – ( +1 / -3 ) – version 1.1
Here you learn to create and set a simple ahref-link to logout the current user.
tags: Logout, Link, user, URL, views

How to implement form events

Created 2 years ago by Antonio RamirezHow-tos4 comments – viewed 15,522 times – ( +6 ) – version 2.0
You have that, when a product is on development they can change its API anytime. This change is quite important though, its related on how to set the events of your form, for example, the useful beforeSubmit.
tags: yii2, forms, how to

YII SaaS Multi Tenant application with single database

Created 3 years ago by Rajith RTutorials5 comments – viewed 15,501 times – ( +11 / -10 ) – version 1.1
Lots of people are asking how to solve it with YII,We think its difficult with YII. But its easy to solve . There is no database triggers needed . we can simply sove it by extending a class(say "RActiveRecord") from CActiveRecord .Then extend all our model classes from that class.

A simple action for XUpload extension

Created 5 years ago by tydeas_drTips1 comment – viewed 15,469 times – ( +3 ) – version 1.1
All the basic functionality for an action used by the xupload extension. Check resources for the source code of this action
tags: tips, xupload, caction

Create sitemap.xml file dynamically on root folder with one hit

Created 4 years ago by kiran sharmaHow-tos1 comment – viewed 15,461 times – ( +5 / -5 ) – version 1.1
I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
tags: SEO, SiteMap, XML

Managing constants easily

Created 5 years ago by briiC.lvTips4 comments – viewed 15,412 times – ( +4 ) – version 1.1
For time to time i have models with constants (basicly status constants) which i use in diferent places and if these constant changes, i have to change mentions of constant in code elsewhere.

How to handle decimal separators (e.g comma instead of dot) for l18n

Created 4 years ago by jpabloHow-tos2 comments – viewed 15,399 times – ( +2 ) – version 1.1
Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.

How to re enable logging during unit testing

Created 5 years ago by AsgarothHow-tos3 comments – viewed 15,313 times – ( +11 ) – version 1.1
Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

Add model validator in Controller

Created 2 years ago by Kostas Apazidis (KonApaz)Tips4 comments – viewed 15,182 times – ( +1 / -1 ) – version 1.1
There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way