/** * Save the data using Service. * As we are using only a file storage, we don't need to check the data for SQL injection * Data gets saved as it is, and then gets escaped on the Twig file * * @param array $data * @return string */ public function saveData(array $data) { if ($this->storageService->saveData($data)) { return '<p class="info">data saved</p>'; } return 'Error saving the data'; }