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