Wiki articles in category Tutorials tagged with "behavior"

Showing 1-3 of 3 items.

Export query content to excel through any of your controllers, also can set cssClass for header/odd/even rows, auto download

Created 10 years ago by Scott_Huang Scott_Huang, updated 10 years ago by Scott_Huang Scott_Huang.

To generate excel by query content, and download through any controller. You also can bind cssClass to header/odd/even rows. As for header, you even can set cssClass for each column.

$this->export2excel($excel_content,$excel_file);

in your controller.

2 0
2 followers
Viewed: 28 679 times
Version: 2.0
Category: Tutorials

Simple Way to Upload and Save File

Created 11 years ago by Misbahul D Munir Misbahul D Munir, updated 11 years ago by Misbahul D Munir Misbahul D Munir.

This tutorial need extension mdmsoft/yii2-upload-file. Follow the intruction to install. After installation done, create controller and action

0 0
4 followers
Viewed: 42 650 times
Version: 2.0
Category: Tutorials

Manage (Target) Language in Multilingual Applications + A Language Selector Widget (i18n)

Created 14 years ago by c@cba c@cba, updated 14 years ago by c@cba c@cba.

In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language. This tutorial shows a Yii-way of doing this.
We implement an event handler for the onBeginRequest event; as the nam...

9 0
19 followers
Viewed: 53 778 times
Version: 1.1
Category: Tutorials