public function prepareView(\Nethgui\View\ViewInterface $view) { parent::prepareView($view); if (is_object($view['read'])) { $view['read']->setTemplate('NethServer\\Template\\Pki\\Index'); } }
public function prepareView(\Nethgui\View\ViewInterface $view) { parent::prepareView($view); if ($this->getAction('SaveState')->hasResumeCallback()) { $this->getAction('SaveState')->resumeView($view[$this->myCurrentAction]); } }
/** * XXX: experimental -> CSS injection **/ public function prepareView(\Nethgui\View\ViewInterface $view) { $cssCode = "\n tr.running td:nth-child(3) { color: green }\n tr.stopped td:nth-child(3) { color: red }\n "; $view->getCommandList('/Resource/css')->appendCode($cssCode, 'css'); $moduleUrl = json_encode($view->getModuleUrl("/Dashboard/Services")); $jsCode = "\n(function ( \$ ) {\n \$(document).ready(function() {\n \$.Nethgui.Server.ajaxMessage({\n isMutation: false,\n url: {$moduleUrl}\n });\n });\n} ( jQuery ));\n "; $view->getCommandList('/Resource/js')->appendCode($jsCode, 'js'); parent::prepareView($view); }
public function prepareView(\Nethgui\View\ViewInterface $view) { parent::prepareView($view); if ($this->getRequest()->hasParameter('renameSuccess')) { $view->getCommandList('read')->show(); } }