public function getFormular() { $pane = new SplitPane(70); $pane->setLeftContent($container = Form::group('Navigation', NULL)); $container->getContent()->div->setStyle('min-height', '600px'); $container->addClass('\\Psc\\navigation'); $pane->setRightContent($this->getFormDocumentation()); $panelButtons = new PanelButtons(array('save', 'reload'), $this->getTranslationContainer()); $form = new \Psc\CMS\Form(NULL, '/entities/navigation-node/' . $this->context, 'post'); $form->setHTTPHeader('X-Psc-Cms-Request-Method', 'PUT'); $form->setContent('buttons', $panelButtons)->setContent('pane', $pane); $main = $form->html(); $main->addClass('\\Psc\\navigation-container'); $main->addClass('\\Psc\\serializable'); $snippet = JooseSnippet::create('Psc.UI.Navigation', array('widget' => JooseSnippet::expr(\Psc\JS\jQuery::getClassSelector($main)), 'flat' => $this->getFlat(), 'uiController' => JooseSnippet::expr('main.getUIController()'), 'languages' => (array) $this->container->getLanguages())); $main->templateAppend($snippet->html()); return $main; }
/** * Erstellt eine Javascript-Expression * * $this->createJooseSnippet( * 'Psc.UploadService', * array( * 'apiUrl'=>'/', * 'uiUrl'=>'/', * 'ajaxService'=>$this->jsExpr('main') * ) * * führt $jsCode wortwörtlich aus */ protected function jsExpr($jsCode) { return JooseSnippet::expr($jsCode); }