Wiki

Sorted by ratingX
Displaying 21-30 of 599 result(s).

Use shortcut functions to reduce typing

Created 4 years ago by qiangTutorials8 comments – viewed 36,560 times – ( +53 ) – 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.

Behaviors & events

Created 4 years ago by pestaaTutorials9 comments – viewed 76,706 times – ( +49 ) – version 1.1
These features provide endless possibilities and unbelievable flexibility, but as current documentation does not give more than a few examples, it might be difficult to fully understand their internals and requirements.

CGridView, CListView and CActiveDataProvider

Created about a year ago by softarkTutorials21 comments – viewed 66,368 times – ( +45 ) – version 1.1
CGridView (or CListView) together with CActiveDataProvider is a very powerful combination of the built-in tools of Yii. But how do they work together to accomplish their fantastic functions? And what are you expected to do to use them and to customize their behaviors? This article explains the very basics of them.

How to generate Yii-like Documentation

Created 2 years ago by AsgarothHow-tos9 comments – viewed 22,148 times – ( +45 ) – 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

Creating a dependent dropdown

Created 5 years ago by dalipTutorials36 comments – viewed 215,837 times – ( +103 / -3 ) – version 1.1
Often you'll need a form with two dropdowns, and one dropdown's values will be dependent on the value of the other dropdown. Using Yii's built-in AJAX functionality you can create such a dropdown.

YiiBoilerplate - Setup a professional project structure in seconds

Created about a year ago by Antonio RamirezOthers52 comments – viewed 39,024 times – ( +44 ) – version 1.1
YiiBoilerplate
tags: directory, config

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

Created 4 years ago by mindehHow-tos5 comments – viewed 20,565 times – ( +41 ) – version 1.1
Original source code and idea are from: PHP, PDO & Nested Transactions.

Extending common classes to allow better customization

Created 3 years ago by Steve FriedlTips0 comments – viewed 19,513 times – ( +41 ) – version 1.1
The two most commonly-used base classes in most Yii applications are CController and CActiveRecord, each extended to your own particular models and controllers.

Configuring PhpStorm IDE for Yii

Created 3 years ago by samdarkTips20 comments – viewed 66,776 times – ( +61 / -1 ) – version 1.1
In order to be able to get from render or renderPartial to the view, from widget to widget class, from relations to model classes you need to install additional plugin called YiiStorm.
tags: IDE, PhpStorm

Javascript and AJAX with Yii

Created about a year ago by Fran├žois GannazHow-tos2 comments – viewed 80,154 times – ( +39 ) – 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