/** * {@inheritdoc} * * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ public function createForm($entity, $formFactory, $action = null, $options = array()) { if (!$entity instanceof Report) { throw new MethodNotAllowedHttpException(array('Report')); } $params = !empty($action) ? array('action' => $action) : array(); $params['read_only'] = false; // Fire the REPORT_ON_BUILD event off to get the table/column data $params['table_list'] = $this->getTableData(); $reportGenerator = new ReportGenerator($this->factory->getSecurityContext(), $formFactory, $entity); return $reportGenerator->getForm($entity, $params); }
/** * {@inheritdoc} * * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ public function createForm($entity, $formFactory, $action = null, $options = []) { if (!$entity instanceof Report) { throw new MethodNotAllowedHttpException(['Report']); } $params = !empty($action) ? ['action' => $action] : []; $params['read_only'] = false; // Fire the REPORT_ON_BUILD event off to get the table/column data $params['table_list'] = $this->getTableData(); $reportGenerator = new ReportGenerator($this->dispatcher, $this->em->getConnection(), $entity, $formFactory); return $reportGenerator->getForm($entity, $params); }