This is a tutorial to work with radioButtonList which will handle enum datatype. Form design and validation both are detailed here.
This is a tutorial to work with radioButtonList which will handle enum datatype. Form design and validation both are detailed here.
This wiki describes a more complex workflow using the XUpload widget
For those who feel, the Controller->accessRules() or RBAC (Role-Based Access Control) is too complicated or doesn't want the username(s) to be hard-coded in accessRules(), here is a very simple, easy-to-implement solution.
This tutorial assumes some basic knowledge of Yii and a functional development environment.
If you need simple Role based access control without the long RBAC process then this article is just for you. Lets jump to the point.
Let's see what exactly are the events in Yii!
$this->render('index', array(
'dataProvider' => $dataProvider,
));
`
Many desktop programmers are used to having dynamic forms, where clicking on a record in a parent sub-form, updates another sub-form with the child records. While having many levels of nested sub-forms in a single view might not be such a good idea for a web application, I thought doing it one level deep might be interesting and useful. But, instead of sub-forms I used CGridViews.
pagoda box is very useful tool for a programmer to test their php app online so its very useful one. For deploying code pagodabox use git command
For each column of the CGridView, we can specify name
, value
, htmlOptions
, cssClassExpression
etc. In the declarations of the attributes value
and cssClassExpression
we can use the "special" variable $data
, for example like this: 'value'=>'$data->author->username',
.
Now we might want to use $data
in the declaration of the `...
The most difficult thing in a big project, is to manage conflicts with files modified by others users. Git can do this work for us.
I've found useful to have a step by step reference guide to work with Git with most used commands, feel free to update it with useful information you may find interesting too.
A few days ago, i worked for CGridView exporting functional for my client. He asked me to create a simple exporting to a CSV file a CGridView search results.
I was wondering how to set-up the application parameters in the back-end to use them all around the application without the need of using the database and I came up with this solution, I hope it helps somebody else.
You have a multilingual application, and you want the URL of a page to be different for different languages, to account for SEO. The URL for the contact page for example should look like http://something.com/en/contact in english, and http://something.com/de/contact in german. This tutorial describes how to make it happen.
Note that currently selected language is always a part...
In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language.
This tutorial shows a Yii-way of doing this.
We implement an event handler for the onBeginRequest event; as the nam...
This wiki is a work in progress.
This wiki has been replaced by Use crypt() for password storage.
Lets say we have two models and relation between them: