It's awesome and not awesome at the same time. Right now I am in the process of using CDbCriteria on the backend with bootstrap, jQuery UI and some other nice tools on the front end for some kickass backend tools. Woe is the developer that doesn't use these technologies. (As an aside the technology is not the solution, it's what you do with it that ultimately matters.)10:25 AM
Yeah don't do this. There are a myriad of reasons to never modify the default core part of the Yii framework, here's a list:
- You're not smarter than the Yii devs otherwise you would be one
- The quick snippet you think is smart, is probably stupid.
- You have no idea what impact changes to core will do down the line to third party modules and extensions
- You're doing it wrong.
If you look at the documentation for CLinkColumn here: http://www.yiiframework.com/doc/api/1.1/CLinkColumn you will notice that there is no "sortable" property of the class. This is a small little monkey wrench thrown into the plans if you want to sort a column based on the text data of a anchor tag. However there is a simple work around for this. When you define your column in the "columns" property set the column type to raw, set the name as the property of the Model and then set the value to use CHtml::link(). As follows:11:33 AM
This class is amazing. It took me basically two hours to build a tabular structure that would have taken me about two days. It's an amazing piece of view technology from the Yii framework that I will write a follow up on when I get a free moment.10:51 PM
Shawn was raped by a moose. (No Shawns were harmed in the making of this post.)03:01 PM