MrFisk is a sleek little bot hanging out in the official #yii IRC channel on freenode, meant to serve Yii users with documentation lookups and other things. This document intends to provide a summary of what MrFisk can do for you and how to use his fin^H^Heatures.
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).
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.
CFormatter is one of Yii's core components and used to format values displayed in widgets like CGridView or CDetailView. All classic formats like numbers, text, urls or datetime are supported but you may have to use a formatting rule that isn't built in. Let's say we want to display arrays of strings (like tags associated with a product model). When using CDetailView we would usually make use of PHPs implode function to create a simple string value of all values in the $product->tags array.