public function updateTemplate() { try { $model = new Template($this->data->template->idTemplate); $model->updateEntry($this->data->template->entry); $this->renderPrompt('information', 'OK', "structure.editEntry('{$this->data->template->entry}');"); } catch (\Exception $e) { $this->renderPrompt('error', $e->getMessage()); } }