- create file common\components\languageSwitcher.php
I leverage Kartik's notification widgets.
When one needs to select a record in a table that do not have related records through a relation, it is generally suggested to use a subquery. Personnaly, I prefer a high level approach, and I have a method to do it with scopes.
This behavior enable you to command the RBAC via console. This avoids you to install a entire rbac graphic toolkit to set up some rules in the rbac, maybe you are running inside a ssh console.
Getting "Expired token" errors ? Here is a solution to avoid invalid CSRF on POST or ajax requests, or user identity changes.
A short explication on how to extract profile information for PHP on your server using XDebug and KCacheGrind or WinCacheGrind.
Here's a tutorial on how to create a CGridView with external date filters
the trick is to create hidden columns within the CGridView Filters
something like in the example below:

This is to show you how to use Yii2 flash messages with Kartik Growl (bootstrap notify wrapper).
Finding good looking, working and not abandoned gallery manager for Yii 1.x application is a tough task. Out of all I found, only yii-gallery-manager extension looked promising. But, after downloading it, it turned out, that there are certain unusual things to do, to include it in your application. So, I decided to write this article...
I faced many issues when hosted our company website on AppFog.
This page is created to supply short directions and general tips for managing a Yii application in NetBeans IDE.
One of the common tasks the web application might be required to perform, especially the app using some kind of a CMS, is to save the history of data changes. Your client for sure will want the answer to this simple question - If I mess this up or delete by accident can we bring it back? Well, DB backup is one thing and quick recovery is another - let's talk about latter one.
I'm using PayPal's script from
This tutorial is explained following "basic" application structure.
During development and depending on your setup you may need to use the options forceCopy or
linkAssets of the asset manager to work around possible file-system and permission issues.
class Post extends CActiveRecord {
...
}
`
When you list Authors in grid you would like to print the count of posts in column, allow sorting on this column and probably filtering by the count.
Your application is international and you have to select the best language for the user. Your user may have selected 'fr_CA' and you have 'fr_FR' or 'fr' available. What do you do? Here is a tip.
Introduction
How to add additional information to a user when using BUM extension?
Sometimes we need to create our custom exception and show it to the end user through a friendly way . In this article, I'm showing how to do it using CJuidialog.