public function newFrameRelations() { try { $model = new Frame(); $this->data->frame->entry = 'frm_' . strtolower(str_replace('frm_', '', $this->data->frame->entry)); $model->setData($this->data->frame); $inheritsFromBase = $this->data->inheritsFromBase == 'on'; $relations = $model->createNew($this->data->frame, $inheritsFromBase); if (count($relations['direct']) || count($relations['inverse'])) { $this->renderPrompt('information', 'Frame created.', "structure.editRelations('{$this->data->frame->entry}');"); } else { //$this->renderPrompt('information', 'OK', "structure.editEntry('{$this->data->frame->entry}');"); $this->renderPrompt('information', 'OK', "structure.editEntry('{$this->data->frame->entry}','formNewFrame')"); $this->renderPrompt('information', 'OK'); } } catch (\Exception $e) { $this->renderPrompt('error', $e->getMessage()); } }