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 24,791 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 3 years ago by MikeTips2 comments – viewed 6,865 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,048 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,341 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

CGridView customized CCheckBoxColumn

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

Quick Tip about Pagination Params

Created 5 years ago by Antonio RamirezTips2 comments – viewed 27,977 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,082 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 32,449 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 72,012 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 about a year ago by CTalaTips2 comments – viewed 10,384 times – ( +3 ) – version 2.0
Guys,