Wiki

Sorted by viewsX
Displaying 421-430 of 732 result(s).

RBAC Super Simple with Admin and User

Created 3 months ago by evercodeTutorials6 comments – viewed 10,720 times – ( +8 / -3 ) – version 2.0
One of the common requests I see in the forum is how to implement RBAC. While you can implement Yii 2's built-in RBAC, that might be too much for developers who are just starting with Yii 2 or have simpler needs. Sometimes you are looking for a fast solution and just want two flavors, user and admin. And even if you will eventually need more, you can use these methods as a starting point for developing your own features or move on to Yii 2's RBAC.

YII SaaS Multi Tenant application with single database

Created about a year ago by Rajith RTutorials5 comments – viewed 10,603 times – ( +10 / -10 ) – version 1.1
Lots of people are asking how to solve it with YII,We think its difficult with YII. But its easy to solve . There is no database triggers needed . we can simply sove it by extending a class(say "RActiveRecord") from CActiveRecord .Then extend all our model classes from that class.

Insert a multirow header in CGridView

Created about a year ago by PeppeHow-tos2 comments – viewed 10,583 times – ( +6 ) – version 1.1
The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way you can write columns grouping headers, and obtain a nicer view.

caching controllers with filters()

Created 3 years ago by RusAlexHow-tos1 comment – viewed 10,400 times – ( +2 ) – version 1.1
Hello, this article will describe some aspects about caching controllers with filters() method in your controller. And I will describe some problems I meet when using this approach for caching, the main problem was

Adding a link to a CDataColumn

Created about a year ago by le_topTips6 comments – viewed 10,363 times – ( +3 ) – version 1.1
Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created 2 years ago by Xgamer99Tips3 comments – viewed 10,325 times – ( +1 ) – version 1.1
I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it or on the 'select all' checkbox.

ChromePHP for Yii

Created 4 years ago by imeheszTips0 comments – viewed 10,254 times – ( +3 / -2 ) – version 1.1
ChromePHP is a console logging extension for Google Chrome.

Encapsulate db and module configurations

Created 5 years ago by ricardogranaTutorials3 comments – viewed 10,237 times – ( +7 ) – version 1.1
This method was inspirated on the excellent text about different environments available at http://www.yiiframework.com/doc/cookbook/32/
tags: module

Yii code completion and calltips in Komodo Edit

Created 4 years ago by viterTips1 comment – viewed 10,102 times – ( +6 ) – version 1.1
My favourite editor is Komodo Edit (free and crossplatform) and I use it for my everyday coding work. Just recently I found out how to make it help me to work with Yii. :) So follow these steps:
tags: Komodo Edit

Using CListView to display items next to each other (in columns)

Created about a year ago by thyseusTips4 comments – viewed 10,058 times – ( +11 )
When using CListView to display multiple views next to each other, we can use the $index variable inside the viewFile to achieve this. As far as i know there is no extension or out-of-the-box functionality for this, so we need to apply a little hack: