public function updateCorpus() { try { $model = new Corpus($this->data->corpus->idCorpus); $this->data->corpus->entry = 'crp_' . strtolower(str_replace('crp_', '', $this->data->corpus->entry)); $model->updateEntry($this->data->corpus->entry); $this->renderPrompt('information', 'OK', "structure.editEntry('{$this->data->corpus->entry}');"); } catch (\Exception $e) { $this->renderPrompt('error', $e->getMessage()); } }