Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 11-20 of 301 result(s).

How to setup RBAC with a php file

Created 4 years ago by bettorHow-tos17 comments – viewed 51,638 times – ( +26 / -4 ) – version 1.1
In this cookbook I will attempt to explain how to use the lightweight version of Role-Based Access Control using a php file. This version does not use database but a php file and is controlled by CPhpAuthManager class.

Using CButtonColumn to customize buttons in CGridView

Created 3 years ago by TrejderHow-tos17 comments – viewed 183,074 times – ( +96 ) – 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.

Real-time display of server push data using Server-Sent Events (SSE)

Created 2 years ago by bennounaHow-tos16 comments – viewed 28,340 times – ( +12 ) – version 1.1
There are several methods and techniques that come handy in the case you need to call an external resource periodically or if you are waiting for a server push, but I present here an easy and straightforward one using HTML5's Server-Sent Events (SSE).

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 3 years ago by xrxHow-tos16 comments – viewed 31,737 times – ( +23 ) – version 1.1
Since I used CGridView for a first time, I didn't like how it handled operations like sorting, filtering, changing page and etc using AJAX.

Uploading multiple images with CMultiFileUpload

Created 3 years ago by rsinghHow-tos16 comments – viewed 72,295 times – ( +37 ) – version 1.1
"The documentation for CMultiFileUpload isn't clear!"

Url: hide index.php

Created 3 years ago by HermansHow-tos15 comments – viewed 92,426 times – ( +26 / -1 ) – version 1.1
Maybe it looks simple, but some time ago I need some time to find a solution of this case. I finally got it, and I want to share that I also experienced such cases. So that it can make reference.

AngularJS Frontend:Connecting it with a Yii Backend REST API.Gallery Manager Demo Application.

Created about a year ago by drumaddictHow-tos15 comments – viewed 36,568 times – ( +20 ) – version 1.1
AngularJS Frontend:Connecting it with a Yii Backend REST API.Gallery Manager Demo Application.

Multiple-database support in Yii

Created 3 years ago by Steve FriedlHow-tos14 comments – viewed 63,660 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

How to use a Widget as an Action Provider

Created 3 years ago by Antonio RamirezHow-tos14 comments – viewed 29,766 times – ( +27 ) – version 1.1
As written on the API docs: An Action Provider Widget is a widget that has declared several actions by using its 'public static function actions()'. After, a Controller can easily import all its declared actions on its 'public function actions()'.
tags: Widgets, CAction

Searching and Sorting by Count of Related Items in CGridView

Created 2 years ago by softarkHow-tos13 comments – viewed 28,562 times – ( +29 ) – version 1.1
Let's say we have two models and relation between them: