Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 151-160 of 342 result(s).

multiple CActiveDataProviders in one CGridView

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos6 comments – viewed 15,679 times – ( +7 / -1 ) – version 1.1
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

Radio Button List with enum values for column of type ENUM >+> incorporate into giix

Created 3 years ago by pckabeerHow-tos1 comment – viewed 15,578 times – ( +7 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a Radio Button List, which has the enum values as options. This is a rewrite of c@cba in the wiki article of enumDropdownListThe main code was contributed by zaccaria in the forum (see this post).

Twitter Bootstrap style Breadcrumbs

Created 2 years ago by junaidatariHow-tos0 comments – viewed 15,530 times – ( +5 / -1 ) – version 1.1
1: Create breadcrumb in your view file.

Cheat Sheet: Displaying Name instead of Numbers and Displaying Alphanumeric instead of numeric values

Created 2 years ago by skwordenHow-tos4 comments – viewed 15,442 times – ( +4 / -1 ) – version 1.1
I keep a reference to some simple but painful task if you forget a common or something. I am new to Yii and this took awhile for me to figure out. Everything I read said do this or do that and not a single one worked for me. However, the following did.

i18n All-in-one format and timezone conversions for date, time, timestamp and datetime.

Created about a year ago by Gerhard LiebenbergHow-tos3 comments – viewed 15,315 times – ( +7 / -1 ) – version 1.1
Countries sometimes change their laws pertaining to timezones and daylight saving times. This means that GMT+2 can be a different time this August compared to last August! However, by using php's DateTime class (instead of timestamps), we can do both "format" and "timezone" conversions on a single DateTime object (only 2 lines of code) for date, time, timestamp and datetime types - while php takes care of nightmares such as current and historical timezones and daylight saving times.

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Created about a year ago by Kartik VHow-tos2 comments – viewed 15,214 times – ( +37 / -4 ) – version 2.0
In Yii 2.0, the yii widgets that use Twitter Bootstrap CSS & JS directly, are part of the yii2-bootstrap extension, starting with yii/bootstrap namespace. For customizing bootstrap extension specific widget assets, you could configure your own assets (CSS/JS) using the new Yii Asset Manager in your Yii Config file. Something like:

ACL and RBAC

Created 3 years ago by zeroByteHow-tos0 comments – viewed 15,174 times – version 1.1
This HowTo assumes that you have a smattering of ACL in general and of how the acl-extension works basically. It will introduce you into the abstract and give you a hint on how to use Business-Rules. If you have in-depth questions, please refer to the extension documentation. Using ACL in an RBAC-manner cannot and should never obscure the fact that the underlying system is still ACL-based. In fact, the Business-Rules are just another layer in the permission-check plan.

A Multi-Tenant Strategy using Yii and MySQL

Created about a year ago by JFReyesHow-tos8 comments – viewed 14,986 times – ( +9 ) – version 1.1
This article describes an implementation of multi-tenancy using Yii and MySQL.

How to hide index.php on Microsoft Windows Server with IIS7

Created 2 years ago by GiulianoHow-tos2 comments – viewed 14,822 times – ( +9 ) – version 1.1
I've seen lot of people struggling in finding a way to hide the script name when installing their Yii Application. In an Apache environment everything is well documented in this wiki article, but for those who are running their app on a Windows Server machine there are no hints.