3
有沒有辦法利用索納塔的Datagrid功能來顯示結果集?Symfony2 - 沒有實體的索納塔datagrid
class DefaultController extends Controller
{
public function nl_listAction()
{
$obj = array();
$cnx = $this->get('doctrine.dbal.a_connection');
$cnx->query('CALL(a_procedure)');
$obj['cnx'] = $cnx;
return $this->render('GlideConfigBundle:Default:nl_list.html.twig', $obj);
}
}
這裏從一個控制器我打電話給一個程序,我想使用Datagrid顯示結果數據。
這是一個好主意嗎?
我該怎麼做?