Wiki

Articles in category "tips", sorted by ratingX
Displaying 91-100 of 103 result(s).

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created 7 months ago by Xgamer99Tips3 comments – viewed 4,351 times – ( +1 )
I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it or on the 'select all' checkbox.

an easy way to required multi columns(At least one cannot be blank)

Created about a year ago by 1065227709Tips0 comments – viewed 3,583 times – ( +1 )
in model add the following code:
tags: rules

How to use a component before every action of a controller

Created 2 months ago by transistorTips1 comment – viewed 3,369 times – ( +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.

Setting static modules' properties in config

Created 8 months ago by Alexander PalamarchukTips0 comments – viewed 2,923 times – ( +2 / -2 )
You may face a situation when you need to access to a configurable module's property from everywhere and you don't have an instance of this module's class.
tags: config, module

Yii实战中8个必备常用的扩展,模块和

Created 2 years ago by Darwin WenTips2 comments – viewed 11,892 times – ( +2 / -3 )
在经过畅K网的实战后,总结一下在Yii的项目中会经常用到的组件和一些基本的使用方法,分享给大家,同时也给自己留个备忘录,下面我以代码加图片说明.
tags: module, Widgets

An easy way to use escopes and CActiveDataProvider

Created 2 years ago by Rafael GarciaTips8 comments – viewed 14,381 times – ( +1 / -1 )
Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.

Speedup unit tests by moving MySql data to memory (in Ubuntu)

Created 6 months ago by sebTips0 comments – viewed 3,023 times – ( +1 / -1 )
Speedup unit tests by moving MySql data to memory [Ubuntu]
tags: mysql, unit test

Using MBMenu and Rights to automatically create menu item for your modules

Created 2 years ago by dinhtrungTips2 comments – viewed 8,438 times – ( +1 / -1 )
Using Rights generator component, we can easily create a dynamic menu, in which we scan every modules' controllers, to access the index page of them.

关于Yii CHttpSession性能优化篇之源码流程分析

Created about a year ago by Darwin WenTips0 comments – viewed 3,963 times – ( +1 / -1 )
当我们使用Yii数据库去保存Session时,只要简单的配置就可以完成这个功能,在进行性能优化这个主题之前,我们先来查看一下CHttpSession和CDBHttpSession源代码,探讨CHttpSession和CDBHttpSession的流程再进行深一步优化主题。

Yii CDBHttpSession数据库存储session性能优化实战

Created about a year ago by Darwin WenTips0 comments – viewed 4,542 times – ( +1 / -1 )
上一篇 关于 Yii CHttpSession性能优化篇之源码流程分析 有详细分析CHttpSession执行流程,在了解CHttpSession的详细执行流程之后,我们就可以非常轻松的扩展Yii Session,来优化和符合自己的业务流程。