public function getColModelJson($prefix = '')
    {
        $model = $this->colmodel;
        $dp = '';

        if (array_key_exists('datepicker', $model) && $model['datepicker']) {
            $dp = ' ,"searchoptions" : {dataInit : datePick, "attr" : { "title": "Choisir une date" }}';
        }

        if (array_key_exists('autocomplete', $model)) {
            $route = $this->router->generate($model['autocomplete']);
            $dp = ' ,"searchoptions" : {dataInit : function(elem) { $(elem).autocomplete({source:\'' . $route . '\',minLength:2}) }}';
        }

        unset($model['twig']);
        unset($model['having']);
        unset($model['value']);
        unset($model['datepicker']);
        unset($model['autocomplete']);

        //prefix index
        if (array_key_exists('name', $model)) {
            $model['name'] = $prefix . $model['name'];
        }

        $models = $this->encode($model);

        $models = substr($models, 0, strlen($models) - 1) . $dp . '}';

        return $models;
    }
public function getColModelJson($prefix = '')
    {
        $model = $this->colmodel;
        $dp = '';

        if (array_key_exists('datepicker', $model) && $model['datepicker']) {
            $dp = ' ,"searchoptions" : {dataInit : datePick, "attr" : { "title": "Choisir une date" }}';
        }

        if (array_key_exists('autocomplete', $model)) {
            $route = $this->router->generate($model['autocomplete']);
            $dp = ' ,"searchoptions" : {dataInit : function(elem) { $(elem).autocomplete({source:\'' . $route . '\',minLength:2}) }}';
        }

        unset($model['twig']);
        unset($model['having']);
        unset($model['value']);
        unset($model['datepicker']);
        unset($model['autocomplete']);

        //prefix index
        if (array_key_exists('name', $model)) {
            $model['name'] = $prefix . $model['name'];
        }

        $models = $this->encode($model);

        $models = substr($models, 0, strlen($models) - 1) . $dp . '}';

        return $models;
    }
public function getColModelJson ( $ prefix = '' ) { $ model = $ this -> colmodel ; $ dp = '' ; if ( array_key_exists ( 'datepicker' , $ model ) && $ model [ 'datepicker' ] ) { $ dp = ' ,"searchoptions" : {dataInit : datePick, "attr" : { "title": "Choisir une date" }}' ; } if ( array_key_exists ( 'autocomplete' , $ model ) ) { $ route = $ this -> router -> generate ( $ model [ 'autocomplete' ] ) ; $ dp = ' ,"searchoptions" : {dataInit : function(elem) { $(elem).autocomplete({source:\'' . $ route . '\',minLength:2}) }}' ; } unset ( $ model [ 'twig' ] ) ; unset ( $ model [ 'having' ] ) ; unset ( $ model [ 'value' ] ) ; unset ( $ model [ 'datepicker' ] ) ; unset ( $ model [ 'autocomplete' ] ) ; //prefix index if ( array_key_exists ( 'name' , $ model ) ) { $ model [ 'name' ] = $ prefix . $ model [ 'name' ] ; } $ models = $ this -> encode ( $ model ) ; $ models = substr ( $ models , 0 , strlen ( $ models ) - 1 ) . $ dp . '}' ; return $ models ; }
Decorate specific column model attributes with
values expected to build the view

@param string $prefix

@return array
Decorate specific column model attributes with values expected to build the view