Wiki

Sorted by ratingX
Displaying 61-70 of 713 result(s).

How to add more information to Yii::app()->user

Created 5 years ago by qiangTutorials2 comments – viewed 122,445 times – ( +28 ) – version 1.1
By default, the expression Yii::app()->user returns a CWebUser application component which represents the information that are closely related with the current user. Some information can be persistent throughout the current user session. For example, CWebUser already comes with a name property that stores the username of the current user.

Organize directories for applications with front-end and back-end

Created 5 years ago by qiangTutorials10 comments – viewed 62,735 times – ( +28 ) – version 1.1
Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing directories of the code for both ends.

Adding Yii Search to Your Browser Search Box

Created 4 years ago by qiangTips1 comment – viewed 32,677 times – ( +28 ) – version 1.1
The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.
tags: search

Multiple-database support in Yii

Created 3 years ago by Steve FriedlHow-tos15 comments – viewed 69,710 times – ( +28 ) – version 1.1
The customary configuration of a Yii application includes just a single database section in the protected/config/main.php file, but it's easy to extend this to support more than one, tying each Model to one of the databases.
tags: Database

URL component access functions

Created 3 years ago by Steve FriedlTips1 comment – viewed 10,678 times – ( +28 ) – version 1.1
Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest class wraps various $_SERVER variables to break down the URL into its constituent parts.
tags: URL, request

Save and Display Date/Time Fields in different formats in Yii2

Created 6 months ago by Kartik VHow-tos10 comments – viewed 7,715 times – ( +28 ) – version 2.0
You would find having such a need in most Yii Projects. Your database needs a specific format to store date fields, while you may want to display it in different formats to the users on forms and other views.

Editing, Deleting, and Viewing model data with the yii2-detail-view extension

Created 6 months ago by Kartik VTutorials0 comments – viewed 4,908 times – ( +28 ) – version 2.0
The yii2-detail-view extension offers you an easy way to EDIT and VIEW your model data, toggle these modes, and adds other features. You can read the extension documentation and/or view a demo of this extension, to understand usage.

Using the yii2-datecontrol extension along with yii2-detail-view widget

Created 6 months ago by Kartik VHow-tos0 comments – viewed 2,006 times – ( +28 ) – version 2.0
The yii2-datecontrol extension allows you to control separate date formats for display and saving for form inputs.

Nested inline active fields inside Bootstrap horizontal forms

Created 5 months ago by Kartik VHow-tos2 comments – viewed 5,955 times – ( +28 ) – 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.

Cookie management in Yii

Created 3 years ago by TrejderHow-tos5 comments – viewed 91,561 times – ( +41 / -1 ) – version 1.1
Cookie management in Yii is easy, but may not be so obvious for the beginners to this framework, so I wrote this simple article to clear some doubts out.