Wiki

Sorted by ratingX
Displaying 331-340 of 482 result(s).

Auto TDD - How to auto-run PHPUnit

Created 2 years ago by imeheszTips3 comments – viewed 9,364 times – ( +3 )
If you are lucky enough and have the privilege to develop on a Linux based environment, this little tip might boost-up your TDD process (at least the Unit Testing part). Please note, that this should work just fine with Apple computers also, but not tested!
tags: PHPUnit, testing, TDD

Localized version of CFormatter

Created 7 months ago by marcovtwoutHow-tos2 comments – viewed 1,986 times – ( +3 )
The default CFormatter (accessible through Yii::app()->format) is not locale aware, unfortunately. Until it is, here is a quick and easy way to localize it, by extending the default class.

How to use Smarty renderer in Yii

Created 2 years ago by dongbetaHow-tos2 comments – viewed 11,581 times – ( +3 )
At first, create a class named SmartyRenderer under application/components or any directory you want.
tags: smarty, renderer

Handling recursive deletion in Yii

Created 6 months ago by JamesBarnsleyHow-tos3 comments – viewed 3,589 times – ( +3 )
As a lead developer at Mutable Labs I was tasked to find a way to do recursive deletion in Yii. As I asked other developers and looked around the internet the usual answers all came up, use a plugin or use cascade delete at the DB level, but I did not want to do either of these.

A simple action for XUpload extension

Created 2 years ago by tydeas_drTips1 comment – viewed 9,922 times – ( +3 )
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

Upload CSV File

Created 5 months ago by bhavesh vaghelaTutorials0 comments – viewed 4,317 times – ( +3 )
View file

Patching PHP code (used as a library) without changing the original code!

Created 3 months ago by le_topTips0 comments – viewed 1,866 times – ( +3 )
The article Fixing extensions without modifying their code reminded me of another patching technique that I used. My conviction and a hard look on the web had led me to an article Redefine PHP class methods or class giving me a head start to do what I wanted: patching third party code without touching the original to allow easy upgrades.
tags: patch, patching

Adding a link to a CDataColumn

Created 3 months ago by le_topTips4 comments – viewed 3,059 times – ( +3 )
Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

How to use the official Yii installer for Composer (**DEPRECATED**)

Created 2 months ago by br0skHow-tos9 comments – viewed 3,811 times – ( +3 )
This wiki shall be considered deprecated since the Yii installer for composer has been discontinued.