/** * {@inheritdoc} */ public function saveEntity($entity, $flush = true) { parent::saveEntity($entity, $flush); //add the results $results = $entity->getResults(); $results['submission_id'] = $entity->getId(); $form = $entity->getForm(); $results['form_id'] = $form->getId(); if (!empty($results)) { $this->_em->getConnection()->insert($this->getResultsTableName($form->getId(), $form->getAlias()), $results); } }
/** * {@inheritdoc} */ public function saveEntity($entity, $flush = true) { parent::saveEntity($entity, $flush); //add the results $results = $entity->getResults(); $results['submission_id'] = $entity->getId(); $form = $entity->getForm(); $results['form_id'] = $form->getId(); $tableName = MAUTIC_TABLE_PREFIX . 'form_results_' . $form->getId() . '_' . $form->getAlias(); if (!empty($results)) { $this->_em->getConnection()->insert($tableName, $results); } }