Wiki

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

New Relic Error Alert with Yii

Created 3 years ago by simon604Tips2 comments – viewed 14,731 times – ( +6 ) – version 1.1
Introduction

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

Created 3 years ago by Kostas Apazidis (KonApaz)Tips2 comments – viewed 26,939 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

A universal model attribute for its synthetic representation

Created 3 months ago by Alexandre RodichevskiTips2 comments – viewed 2,971 times – version 2.0
It is convenient to use the same identification attribute, say info, in all of the active records of your application. It should be a virtual read-only attribute defined by a getter method, its label being the model name.

Access log output from unit tests

Created 4 years ago by MikeTips2 comments – viewed 7,457 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 6 years ago by zaccariaTips2 comments – viewed 47,297 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 6 years ago by zaccariaTips2 comments – viewed 17,088 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 11,486 times – ( +5 ) – version 1.1
Hi friends,

Quick Tip about Pagination Params

Created 5 years ago by Antonio RamirezTips2 comments – viewed 28,854 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 4 years ago by sirin kTips2 comments – viewed 9,603 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 34,525 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