Wiki

Articles in category "tips", sorted by commentsX
Displaying 61-70 of 151 result(s).

Custom column in TbGridView with icon by condition, find out icon class glyphicons easy (YiiBooster)

Created 2 years ago by Kostas Apazidis (KonApaz)Tips2 comments – viewed 25,390 times – ( +2 / -1 ) – version 1.1
First of all, You have to find out the class of the desired icon, so visit the http://getbootstrap.com/2.3.2/base-css.html#icons

Access log output from unit tests

Created 4 years ago by MikeTips2 comments – viewed 7,023 times – ( +4 ) – version 1.1
Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.

Ajax update

Created 5 years ago by zaccariaTips2 comments – viewed 46,398 times – ( +21 / -2 ) – version 1.1
Often happens to have the need of change a part of the page with ajax.
tags: AJAX

Code style

Created 5 years ago by zaccariaTips2 comments – viewed 16,572 times – ( +30 ) – 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

CGridView customized CCheckBoxColumn

Created 2 years ago by chandranTips2 comments – viewed 10,481 times – ( +5 ) – version 1.1
Hi friends,

Quick Tip about Pagination Params

Created 5 years ago by Antonio RamirezTips2 comments – viewed 28,195 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

mysql performance tip

Created 3 years ago by sirin kTips2 comments – viewed 9,226 times – ( +2 / -1 ) – version 1.1
When we are doing an insert of huge no.of rows into an SQL table ,Normally we will try to write separate insert quries this may lead us to a long duration of execution time and we can increase the speed of executing SQL quries by adding all the rows into a single insert query.
tags: mysql

Putting Function To Be Called In View

Created 5 years ago by junxiongTips2 comments – viewed 33,111 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

The complete beginner's study guide for the Yii Framework

Created 3 years ago by Rodrigo CoelhoTips2 comments – viewed 74,685 times – ( +21 ) – version 1.1
Start studying the MVC pattern. You will understand the roles of the model, the view and the controller and know where goes each part of the code.

Yii2 default values for Index data Provider

Created 2 years ago by CTalaTips2 comments – viewed 11,505 times – ( +3 ) – version 2.0
Guys,