Wiki

Articles in category "tips", sorted by commentsX
Displaying 91-97 of 97 result(s).

CjuiDatepicker

Created about a month ago by hiral darjiTips0 comments – viewed 2,468 times – ( +2 )
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:

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

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

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

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

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

Created about a month ago by le_topTips0 comments – viewed 2,261 times – ( +3 )
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.

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

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

Customizing Yii's formatting rules (extending CFormatter)

Created about a year ago by HaenselTips0 comments – viewed 8,341 times – ( +14 )
CFormatter is one of Yii's core components and used to format values displayed in widgets like CGridView or CDetailView. All classic formats like numbers, text, urls or datetime are supported but you may have to use a formatting rule that isn't built in. Let's say we want to display arrays of strings (like tags associated with a product model). When using CDetailView we would usually make use of PHPs implode function to create a simple string value of all values in the $product->tags array.

Using events with CAction classes

Created about a year ago by Antonio RamirezTips0 comments – viewed 7,510 times – ( +8 )
There are some good guides out there explaining how to work with events and the ways to attach them to your components, but none (that I know) explain the following way to configure your events with CAction classes on your controllers the following way.