Wiki

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

Preventing CJuiTabs from hiding drop-down CMenu items

Created 5 years ago by Steve FriedlTips1 comment – viewed 10,050 times – ( +4 ) – version 1.1
Almost all Yii applications use CMenu at the top of each page to show options available to the user, and many include drop-down components to allow more fine-grained selection.

Shrink Yii, help your IDE and speed up copying

Created 4 years ago by dckurushinTips4 comments – viewed 9,922 times – ( +10 / -9 ) – version 1.1
In this little tip, I will help you to cut Yii size for about half

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

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

mysql performance tip

Created 3 years ago by sirin kTips2 comments – viewed 9,219 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

Understanding series articles

Created 4 years ago by GOshaTips0 comments – viewed 9,171 times – ( +16 ) – version 1.1
Here are all wiki articles from "Understanding" series by Yii wiki contributors:

View a related field in CGridView

Created 2 years ago by rafaelt88Tips1 comment – viewed 9,132 times – ( +6 ) – version 1.1
Generally we need to show one or more fields from a model that is related to another model used in CGridView. For our case we will use two related models, which explain how to use model "A" fields in a CGridView that used model "B".

Create Form With DynamicModel

Created about a year ago by Misbahul D MunirTips4 comments – viewed 8,842 times – ( +1 ) – version 2.0
In yii2 we can create form without create FormModel. Here we go
tags: form, yii2, model

Functional tests independing from your urlManager settings

Created 5 years ago by RusAlexTips1 comment – viewed 8,817 times – version 1.1
If you are testing your app and use urlManager in your config, sometimes you will find a problem: you want to test your site independing from urlManager settings. in that way you need to extend your WebTestCase class by this method:

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

Created 3 years ago by le_topTips0 comments – viewed 8,634 times – ( +5 ) – version 1.1
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.

Fixing extensions without modifying their code

Created 3 years ago by schmunkTips3 comments – viewed 8,576 times – ( +6 ) – version 1.1
If you're working a lot with extensions you often stumble upon problems, when you want to include them into your custom web application, like hardcoded or absolute path aliases or classes extended from core application components, which implement addiditonal features.