Wiki

Articles in category "tips", sorted by date (updated)X
Displaying 21-30 of 152 result(s).

Yii 2 list of path aliases available with default basic and advanced app.

Updated about a year ago by Kartik VTips2 comments – viewed 60,232 times – ( +51 / -5 ) – version 2.0
If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

Useful Multilanguage extensions collection and use.

Updated about a year ago by Rohit SutharTips2 comments – viewed 5,833 times – ( +3 ) – version 1.1
What I want to achieve:

Customizing the CMenu Widget

Updated about a year ago by mistrybTips1 comment – viewed 45,586 times – ( +5 / -1 ) – version 1.1
The CMenu class provides some useful features for generating menus in your web application.

Yii Rights Management Tips

Updated about a year ago by Rajith RTips0 comments – viewed 5,116 times – ( +6 ) – version 1.1
yii rights some tips..

Analyse the server's USER-AGENT against browsecap file to determine it's capability.

Updated about a year ago by Deepak PradhanTips0 comments – viewed 2,662 times – version 2.0
Does your application need to know user's details on browser details, os and device type? We can use PHP's misc. function to achieve that provided you have an update copy of browsercap.ini

Provide SVG when the browser supports it, else PNG (using CHtml::image overload)

Updated about a year ago by le_topTips0 comments – viewed 3,375 times – ( +1 ) – version 1.1
Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback.

Easy way to redirect http:\\localhost\yii2-basic to http:\\localhost\yii2-basic\web\index.php

Updated about a year ago by Scott_HuangTips0 comments – viewed 10,962 times – ( +3 / -3 ) – version 2.0
First of all, install yii2 basic template according below link:

Step by step for how to full export Yii2 grid to excel

Updated about a year ago by Scott_HuangTips3 comments – viewed 26,614 times – version 2.0
We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:

Add model validator in Controller

Updated about a year ago by Kostas Apazidis (KonApaz)Tips4 comments – viewed 12,860 times – ( +1 / -1 ) – version 1.1
There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way

Create Form With DynamicModel

Updated about a year ago by Misbahul D MunirTips4 comments – viewed 9,398 times – ( +1 ) – version 2.0
In yii2 we can create form without create FormModel. Here we go
tags: form, yii2, model