public function attributeFormat($attribute)
{
$modelClass = $this->generator->modelClass;
$camel_func = 'get' . str_replace(' ', '', ucwords(implode(' ', explode('_', $attribute)))) . 'ValueLabel';
if (!method_exists($modelClass::className(), $camel_func)) {
return;
}
return <<<EOS
[
'attribute'=>'{$attribute}',
'value'=>{$modelClass}::{$camel_func}(\$model->{$attribute}),
]
EOS;
}