/** * Commit submitted data to the database if configured. * * @param FormConfig $formConfig * @param FormData $formData */ protected function processDatabase(FormConfig $formConfig, FormData $formData) { // Write to a Contenttype if ($formConfig->getDatabase()->getContenttype() !== null) { $this->app['boltforms.database']->writeToContentype($formConfig->getDatabase()->getContenttype(), $formData); } // Write to a normal database table if ($formConfig->getDatabase()->getTable() !== null) { $this->app['boltforms.database']->writeToTable($formConfig->getDatabase()->getTable(), $formData); } }