Wiki

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

Use shortcut functions to reduce typing

Created 8 years ago by qiangTutorials8 comments – viewed 50,005 times – ( +58 / -1 ) – 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 6 years ago by Steve FriedlTutorials12 comments – viewed 160,409 times – ( +57 / -1 ) – 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.

Understanding the view rendering flow

Created 5 years ago by dckurushinFAQs16 comments – viewed 193,419 times – ( +96 / -4 ) – version 1.1
There is a lot of confusion surrounding what is happening behind the scenes when you render a view.

Behaviors & events

Created 7 years ago by pestaaTutorials10 comments – viewed 128,246 times – ( +52 / -1 ) – 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.

Configuring PhpStorm IDE for Yii

Created 6 years ago by samdarkTips20 comments – viewed 116,931 times – ( +66 / -2 ) – 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

YiiBoilerplate - Setup a professional project structure in seconds

Created 4 years ago by Antonio RamirezOthers53 comments – viewed 59,334 times – ( +48 / -1 ) – version 1.1
YiiBoilerplate
tags: directory, config

Key web server settings after installing a fresh Yii 2 basic or advanced app

Created 3 years ago by Kartik VTips2 comments – viewed 15,129 times – ( +48 / -1 ) – version 2.0
So, you have installed a brand new Yii 2 app (basic) or (advanced). Here are a few tips for Apache web server users to get things running more secure and better with your yii2 app.

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

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

Configuring different sessions for backend and frontend in Yii advanced app

Created 3 years ago by Kartik VHow-tos2 comments – viewed 26,615 times – ( +47 / -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.

CGridView, CListView and CActiveDataProvider

Created 4 years ago by softarkTutorials22 comments – viewed 118,912 times – ( +46 / -1 ) – 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.