Sorted by ratingX
Displaying 11-20 of 777 result(s).

NetBeans IDE and Yii projects

Created 5 years ago by marcovtwoutTutorials28 comments – viewed 191,284 times – ( +76 ) – version 1.1
This page is created to supply short directions and general tips for managing a Yii application in NetBeans IDE.

CGridView: Render customized/complex datacolumns

Created 4 years ago by JobloTips13 comments – viewed 145,029 times – ( +74 ) – version 1.1
If you have to display a overview of related data in a table, you can use the CListView, create your view with table/tr/td tags and implement db-queries in the view to display detaildata of the current (master-)record.
tags: CGridView

Relations: BELONGS_TO versus HAS_ONE

Created 5 years ago by Steve FriedlFAQs9 comments – viewed 115,214 times – ( +69 ) – version 1.1
It's very common to see new Yii users confusing the relations HAS_ONE and BELONGS_TO, and getting it wrong means you won't get proper values back. And though we'll talk about HAS_MANY as well, we're specifically omitting the MANY_MANY relation because it's a whole different animal.

CJuiDialog to create new model

Created 5 years ago by zaccariaTutorials53 comments – viewed 93,816 times – ( +68 ) – version 1.1
In this tutorial we will learn how to realize a create interface using a dialog.

Getting to Understand Hierarchical RBAC Scheme

Created 5 years ago by daemonsTutorials15 comments – viewed 94,079 times – ( +63 ) – version 1.1
Authentication and Authorization is a good tutorial. Among other topics, it describes basic aspects of Yii's RBAC implementation. But however hard I read the tutorial, I couldn't understand how exactly the hierarchy works. I found how to define authorization hierarchy, how business rules are evaluated, how to configure authManager, but almost nothing about how I should build my hierarchy, in what sequence its nodes are checked, when the checking process stops and what would be the checking result.

Understanding "Safe" Validation Rules

Created 5 years ago by Steve FriedlFAQs11 comments – viewed 109,996 times – ( +93 / -1 ) – version 1.1
A common source of confusion among new Yii users is how the 'safe' validator works, how it works with other validators, and why it's necessary in the first place. This article means to clear up this confusion, as well as explain the notion of Massive Assignment.

Update content in AJAX with renderPartial

Created 6 years ago by BurzumTutorials17 comments – viewed 245,952 times – ( +60 ) – version 1.1
The easiest way to update content in AJAX is to use the renderPartial method.
tags: AJAX

How to work with flash messages

Created 7 years ago by pfthTutorials12 comments – viewed 246,721 times – ( +59 ) – version 1.1
Set your messages in a controller:

Use shortcut functions to reduce typing

Created 7 years ago by qiangTutorials8 comments – viewed 48,195 times – ( +58 ) – version 1.1
Because Yii intends to be integrated nicely with third-party libraries, it does not define any global functions. Everything in Yii needs to be addressed with full class name or object scopes. For example, to access the current user, we need to use Yii::app()->user; to access application parameters, we need Yii::app()->params['name']; and so on. While editors like textmate can help alleviate the problem of these lengthy typings, it is worthwhile to define global shortcut functions to some commonly used method calls. They will make the application code look cleaner.

Understanding "Assets"

Created 5 years ago by Steve FriedlTutorials12 comments – viewed 151,678 times – ( +57 ) – version 1.1
Many newcomers to Yii ask about the assets/ directory found under the webroot, and this article means to explain why it's there and how to work with it.