Sorted by date (updated)X
Displaying 681-690 of 724 result(s).

Auto TDD - How to auto-run PHPUnit

Updated 4 years ago by imeheszTips3 comments – viewed 13,127 times – ( +3 / -1 ) – version 1.1
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

Using standard filters in CGridView custom fields

Updated 4 years ago by jwernerHow-tos4 comments – viewed 52,100 times – ( +17 ) – version 1.1
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.For example: We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0. So we do the usual thing:

Quick Tip about Pagination Params

Updated 4 years ago by Antonio RamirezTips2 comments – viewed 25,285 times – ( +6 ) – version 1.1
Developing custom Grids and ListViews for my new CMS I was facing a small challenge: If I was to update/delete/batch delete items of my Grid, how would I return to the current page view?
tags: Pagination

Performance - A Guide For Best Practice

Updated 4 years ago by ajsharmaTutorials3 comments – viewed 15,978 times – ( +8 / -5 ) – version 1.1
In this guide I will explain best practise regarding performance in MySQL, PHP and of course our loved Yii Framework. Since this is a complex topic, I will start with some basics and then expand this guide from time to time. Since this wiki can become big, you may click on View history - there you can see what changes have been made, so you don't miss anything.
tags: performance

ChromePHP for Yii

Updated 4 years ago by imeheszTips0 comments – viewed 10,123 times – ( +3 / -2 ) – version 1.1
ChromePHP is a console logging extension for Google Chrome.

How to log and debug variables using CWebLogRoute

Updated 4 years ago by Antonio RamirezHow-tos8 comments – viewed 50,828 times – ( +18 ) – version 1.1
I have seen a couple of articles about how to integrate external libraries to debug our PHP code (i.e. firePHP) but after you read this article you will realize that there is no need for such libraries when using Yii.
tags: Logging

Extending CActiveForm for some form display fixes and language tweaks

Updated 4 years ago by TrejderTips0 comments – viewed 13,730 times – ( +5 ) – version 1.1
In this simple example I'll demonstrate how to extend CActiveForm class to overload some drawing functions to achieve some commonly used fixes in forms.

How to customize error handling in console-mode applications

Updated 4 years ago by Steve FriedlHow-tos1 comment – viewed 9,065 times – ( +3 ) – version 1.1
One can control the detail of a web application in the webroot/index.php file by manipulating the values of YII_DEBUG and YII_TRACE_LEVEL, but these don't appear to be used by console applications. This is because although the base CApplication class defines a displayError() method that does consider these variable, CConsoleApplication overrides it with a function that doesn't honor them.

Using setFlash for displaying various kind of messages

Updated 4 years ago by TrejderHow-tos6 comments – viewed 45,898 times – ( +4 / -5 ) – version 1.1
In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.
tags: flash, error, message

Styling Radio Buttons

Updated 4 years ago by Steve FriedlTips4 comments – viewed 38,866 times – ( +15 ) – version 1.1
The default behavior with radio button lists is ugly, and I figured out mostly how to style them a coupla different ways. I'll used the blog tutorial example (but with my own posting modes):