I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.
I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.
If you coming to Yii with experience with Zend Framework for example, most likely you get used to
Zend_Registry::get('paramName');
Zend_Registry::set('paramName');
$P$
.I have had to do this a couple of times now so I figured I would share it with the community. I am going to keep this short because I really hope that you are familiar with jQueryUI's Sortable class before starting this tutorial.
Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.
This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.
Whatever reason, it turns out to be easy enough to add that feature to your application. :)
If in your application you have to proceed to a complex SQL query that is not associated to a model, you will use CDbDataReader like it is described in the Yii documentation. An example could be
With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.
I was looking around wiki and found that was no approach as the one I did so I guessed this is worth to write.
Maybe it looks simple, but some time ago I need some time to find a solution of this case. I finally got it, and I want to share that I also experienced such cases. So that it can make reference.
Please consider the following Dear software engineers imagine I have a simple ISA hierarchy: parent A with children B and C. So let's say we have the corresponding tables named "a", "b", "c" and (created with the help of the gii model creator) the classes A, B, C The following is a screenshot from MySQL workbench:  and if I ever wanted to add another route it wouldn't be feasible opening up all the config files t...
Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field...