Wiki

Articles in category "tips"X
Displaying 121-130 of 135 result(s).

Putting Function To Be Called In View

Created 3 years ago by junxiongTips2 comments – viewed 22,899 times – ( +6 / -1 ) – version 1.1
Sometimes we need some complicated view to be displayed (such as generating complicated table). Most people suggest that in MVC the View must be as simple as possible (don't have too much loops, etc). So what we have to do is to hide away the complex code by putting it at somewhere else. The following are few places options to keep the function:
tags: view, render

Auto TDD - How to auto-run PHPUnit

Created 3 years ago by imeheszTips3 comments – viewed 12,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

Quick Tip about Pagination Params

Created 3 years ago by Antonio RamirezTips2 comments – viewed 23,695 times – ( +5 ) – 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

Extending common classes to allow better customization

Created 3 years ago by Steve FriedlTips0 comments – viewed 20,892 times – ( +42 ) – version 1.1
The two most commonly-used base classes in most Yii applications are CController and CActiveRecord, each extended to your own particular models and controllers.

ChromePHP for Yii

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

Styling Radio Buttons

Created 3 years ago by Steve FriedlTips4 comments – viewed 34,239 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):

Directory independent extensions

Created 3 years ago by GOshaTips3 comments – viewed 8,275 times – ( +15 / -1 ) – version 1.1
Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import() instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases:

Adding Yii Search to Your Browser Search Box

Created 3 years ago by qiangTips1 comment – viewed 30,971 times – ( +28 ) – version 1.1
The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.
tags: search

Code style

Created 3 years ago by zaccariaTips2 comments – viewed 13,257 times – ( +29 ) – version 1.1
Often, when writing widgets or editing Yii code, it is unclear whether or not the code is following the MVC pattern.
tags: mvc

Using Yii with Oracle through PDO

Created 3 years ago by TrejderTips6 comments – viewed 30,088 times – ( +1 ) – version 1.1
When you are developing an webapp with Yii that will be using Oracle RDBMS you should take a look at these issues in which you may run into it.