Abhoryo/APYDataGridBundle — pull request #160 by makarski (2012-06-29 11:00:42+00:00)
Title: Vector Source Column Guessing improved

The column guessing is not performed if type of an UntypedColumn has been previously set for example in such a custom function

public functon generateGridColumn($id, $title, $type, etc...)
{
return Column\UntypedColumn(array('id' => $id, 'title'=>$title, 'type'=>$type ))
}

$columns = array(
$this->generateGridColumn('id', 'title1', 'number'),
$this->generateGridColumn('column', 'title', 'text')
)
$data = array('breakfast'=>'banana', 'dinner'=>'apple')
$source = new Vector($data, $columns);
$grid->setSource($source);

* Left only **true** and **false** values for recognizing a boolean column, since if we have count($data) == 1, values like 0 and 1 are always recognised as boolean which is not always the case, anyway if both number and boolean were set, the number was chosen, so I deleted this condition also.