Team question
I want to bring the issue to a general examination. The question regarding the use of the method "requestGrid" in
TestFrameworkBundle/Test/Client. For historical reasons reguestGrid method is mostly called with the first argument string
as the name of the grid. Despite the fact that the first parameter can be an array with the name and grid parameters(which
should be concated in special way). So there are some disputed things such as determination parameter type:
/**
* @param array|string $gridParameters
* @param array $filter
* @return array ['<gridNameString>', <gridParametersArray>]
*/
protected function parseGridParameters($gridParameters, $filter = array())
{
if (is_string($gridParameters)) {
$gridName = $gridParameters;
$gridParameters = ['gridName' => $gridName];
} else {
$gridName = $gridParameters['gridName'];
}
...
Also possible to pass filter settings as parameters and do not encode them into link as it done now.
$parameters = [];
foreach ($filter as $param => $value) {
$param .= '=' . $value;
parse_str($param, $output);
$parameters = array_merge_recursive($parameters, $output);
}
So the question to the team is:
Does it make sense to change (refresh) existing “renderGrid” logic and apply "global refactoring" for places
where “reguestGrid” method is used (including customizations) ?