/** * Generates HTML name for given model. * @see CHtml::setModelNameConverter() * @param CModel|string $model the data model or the model class name * @return string the generated HTML name value * @since 1.1.14 */ public static function modelName($model) { return $model->formName(); }
/** * Generates HTML name for given model. * @see CHtml::setModelNameConverter() * @param CModel|string $model the data model or the model class name * @return string the generated HTML name value * @since 1.1.14 */ public static function modelName($model) { return $model->formName(); $className = is_object($model) ? get_class($model) : (string) $model; return trim(str_replace('\\', '_', $className), '_'); }