yiisoft / yii2-gii

Yii 2 Gii Extension
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
202 stars 192 forks source link

Add the ability to set the variable`s default value with generateActionParams() #106

Open radiocity opened 9 years ago

radiocity commented 9 years ago

Now \yii\gii\Generator->generateActionParams() generates string like

echo $generator->generateActionParams(); 
// "$lorem, $ipsum"

Add the ability to set the variable`s default value. Something like

echo $generator->generateActionParams(['lorem'=>false, 'ipsum' => 10]); 
// "$lorem = false, $ipsum = 10"
lichunqiang commented 8 years ago

Can you point out the usage?

I just find it used when generate actionView