Wiki

Articles in category "tips", sorted by date (updated)X
Displaying 71-80 of 153 result(s).

How to use a component before every action of a controller

Updated 3 years ago by transistorTips1 comment – viewed 31,174 times – ( +3 / -1 ) – version 1.1
I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.

CGridView: Adding behaviors from configuration, and template items from behaviors to CGridView

Updated 3 years ago by le_topTips0 comments – viewed 8,887 times – ( +5 ) – version 1.1
Changing the way a CGridView is rendered from the configuration file, or through behaviors specified at the moment it is used, is handy to extend a CGridView without creating tons of different classes for it. I am surprised that this is not in the default implementation, so I made my default CGridView implementation.

CjuiDatepicker

Updated 3 years ago by hiral darjiTips1 comment – viewed 7,359 times – ( +3 ) – version 1.1
If you have two datepicker in one form and you want that a date of from date shold be minimum date of todate then put following code in Cjuidatepicker widget options array:

using jqbargraph to create beautiful graphs

Updated 3 years ago by MAHESH.E.UTips1 comment – viewed 7,917 times – ( +5 ) – version 1.1
If you are about to create a graph, the best option i would suggest is the jqbargraph.

CGridView: Render customized/complex datacolumns

Updated 3 years ago by JobloTips13 comments – viewed 145,708 times – ( +74 ) – version 1.1
If you have to display a overview of related data in a table, you can use the CListView, create your view with table/tr/td tags and implement db-queries in the view to display detaildata of the current (master-)record.
tags: CGridView

CJuiTabs Content

Updated 3 years ago by mbalaTips3 comments – viewed 14,116 times – ( +6 ) – version 1.1
When I used CJuiTabs I did something. They are
tags: CJuiTabs

Fixing extensions without modifying their code

Updated 3 years ago by schmunkTips3 comments – viewed 8,951 times – ( +6 ) – version 1.1
If you're working a lot with extensions you often stumble upon problems, when you want to include them into your custom web application, like hardcoded or absolute path aliases or classes extended from core application components, which implement addiditonal features.

Adding a link to a CDataColumn

Updated 3 years ago by le_topTips6 comments – viewed 15,059 times – ( +3 ) – version 1.1
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.

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

Updated 3 years ago by le_topTips0 comments – viewed 5,865 times – ( +5 ) – version 1.1
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

Configuring PhpStorm IDE for Yii

Updated 3 years ago by samdarkTips20 comments – viewed 110,426 times – ( +66 / -1 ) – version 1.1
In order to be able to get from render or renderPartial to the view, from widget to widget class, from relations to model classes you need to install additional plugin called YiiStorm.
tags: IDE, PhpStorm