Wiki

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

Reference: Model rules validation

Created 7 years ago by krillzipHow-tos7 comments – viewed 742,060 times – ( +128 / -1 ) – version 1.1
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.

How to write secure Yii applications

Created 5 years ago by François GannazHow-tos20 comments – viewed 240,628 times – ( +108 / -1 ) – version 1.1
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.

Using CButtonColumn to customize buttons in CGridView

Created 6 years ago by TrejderHow-tos19 comments – viewed 290,277 times – ( +101 / -1 ) – version 1.1
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: Create a REST API

Created 6 years ago by jwernerHow-tos57 comments – viewed 357,894 times – ( +113 / -2 ) – version 1.1
This article will explain how to create a REST API with the Yii framework.

Configuring different sessions for backend and frontend in Yii advanced app

Created 3 years ago by Kartik VHow-tos2 comments – viewed 28,291 times – ( +48 / -1 ) – version 2.0
After you have setup your Yii2 advanced application, you now have setup your user authentication for both frontend and backend. However, if you have first logged into frontend, and try to access backend from the same client machine, you see no login screen, but find yourself automatically logged in.

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

Created 8 years ago by mindehHow-tos6 comments – viewed 44,374 times – ( +47 / -1 ) – version 1.1
Original source code and idea are from: PHP, PDO & Nested Transactions.

Displaying, Sorting and Filtering Model Relations on a GridView

Created 3 years ago by Antonio RamirezHow-tos15 comments – viewed 152,938 times – ( +46 / -1 ) – version 2.0
One of the things you will find tricky to implement is the the sorting and filtering of a GridView's column that displays related model data.

How to generate Yii-like Documentation

Created 6 years ago by AsgarothHow-tos9 comments – viewed 34,337 times – ( +46 / -1 ) – version 1.1
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

Javascript and AJAX with Yii

Created 4 years ago by François GannazHow-tos3 comments – viewed 140,769 times – ( +42 / -1 ) – version 1.1
This page intends to provide an exhaustive guide of how to use Javascript (JS) in Yii. It does not explain how to learn coding in JS, but how to deal with it "the Yii way".
tags: javascript, AJAX

Nested inline active fields inside Bootstrap horizontal forms

Created 3 years ago by Kartik VHow-tos2 comments – viewed 38,760 times – ( +42 / -1 ) – version 2.0
Are you using the Bootstrap 3 form styles with Yii 2 Active Forms? Have you faced problems in displaying complex layouts which needs you to display multiple inline form fields in a single row, within bootstrap horizontal forms. Then read on.