Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 1-10 of 182 result(s).

Reference: Model rules validation

Created 3 years ago by krillzipHow-tos4 comments – viewed 251,788 times – ( +84 )
This is a reference to be used for Model rule validation and is compiled from the Yii documentation and code. The purpose is to have all the information gathered in one place instead of scattered. This reference is not an intro. See The Definitive Guide to Yii, Declaring Validation Rules for a tutorial.

Using CButtonColumn to customize buttons in CGridView

Created 2 years ago by TrejderHow-tos15 comments – viewed 103,150 times – ( +81 )
CGridView is a one of most flexible widgets in Yii and example its flexibility is CButtonColumn used to build buttons for steering model in each grid row. Here in this how-to we will explain ways user can customize CButtonColumn to flexibly fit it to its needs.

How to write secure Yii applications

Created about a year ago by François GannazHow-tos11 comments – viewed 68,979 times – ( +78 )
warning: While this security guide tries to be quite complete, is not exhaustive. If security matters for you, you ought to check several other references.

Create your own Validation Rule

Created 2 years ago by nickcvHow-tos8 comments – viewed 62,153 times – ( +58 )
Some times the core validation rules provided by Yii won't satisfy all your needs, so you'll need to create your very own validation rule.

How-To: Create a REST API

Created 2 years ago by jwernerHow-tos38 comments – viewed 104,255 times – ( +86 / -1 )
This article will explain how to create a REST API with the Yii framework.

How to generate Yii-like Documentation

Created 2 years ago by AsgarothHow-tos6 comments – viewed 15,232 times – ( +42 )
Something a good application cant miss is documentation, and what would be better than some nice formatted HTML documentation that can be auto-generated from your code, we know several tools that already do this like phpDocumentor, but today we are introducing Yii Docs Generator which is a modification of the code that Yii itself uses to generate its documentation, thank phpnode for this wonderful work.
tags: doc

Creating a jQueryUI Sortable CGridView

Created about a year ago by blindMoeHow-tos13 comments – viewed 17,008 times – ( +35 )
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.

Uploading multiple images with CMultiFileUpload

Created 2 years ago by rsinghHow-tos11 comments – viewed 41,962 times – ( +33 )
"The documentation for CMultiFileUpload isn't clear!"

How to use nested DB transactions (MySQL 5+, PostgreSQL)

Created 3 years ago by mindehHow-tos4 comments – viewed 13,011 times – ( +32 )
Original source code and idea are from: PHP, PDO & Nested Transactions.

Single table inheritance

Created about a year ago by samdarkHow-tos6 comments – viewed 13,646 times – ( +31 )
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 of the same table.