Ejemplo n.º 1
0
 public function edit($pluginId)
 {
     //Validate plugin id, structure and the record id to see if they are related
     //if not then shoot back to the plugin id
     $pluginFormBuilder = new PluginFormBuilder();
     $cmsPluginsFunctions = new CmsPluginsFunctions();
     $this->model->valRecord($pluginId, $_GET['psid'], $_GET['id']);
     //Build the form simply using plugin id and component structure id
     $this->view->renderForm = $pluginFormBuilder->renderPluginForm($pluginId, $_GET['psid'], $_GET['id']);
     $hastiny = $cmsPluginsFunctions->has_tinymce($_GET['psid']);
     $this->view->appendJsToHead('scripts/plugins/savePlugin.php?pid=' . $pluginId . '&psid=' . $_GET['psid'] . '&id=' . $_GET['id'] . ($hastiny == true ? '&tiny=true' : ''));
     $this->view->title = 'Edit Plugin';
     $this->view->render('header');
     $this->view->render('topnav');
     $this->view->render('menu');
     $this->view->render('plugins/edit');
     $this->view->render('footer');
 }