yiisoft/yii — pull request #2446 by LastDragon-ru (2013-05-05 11:24:49+00:00)
Title: Fix #129: Rework of #2225

This is fixed version of #2225.

```php
// Custom generator
CHtml::setModelNameConverter(function($model) {
$module = Yii::app()->getController()->getModule();
$classname = is_object($model)
? get_class($model)
: (string) $model;

return $module && $module->getId() !== 'gii'
? 'model_'.md5($classname)
: $classname;
});

// Getting form params
if (isset($_POST[CHtml::getNameByModel($model)])) {
// ...
}
```