/** * Render the browser view * @access public */ public function render() { $session = JFactory::getSession(); $view = new WFView(array('name' => 'browser', 'layout' => 'file')); // assign session data $view->assign('session', $session); // assign form action $view->assign('action', $this->getFormAction()); // return view output $view->display(); }
/** * Get or create the theme view * @access provate * @return object WFView */ private function &getView() { static $view; if (!is_object($view)) { // create plugin view $view = new WFView(array('base_path' => WF_EDITOR_THEMES . DS . $this->get('theme'), 'template_path' => WF_EDITOR_THEMES . DS . $this->get('theme') . DS . 'tmpl', 'name' => $this->get('dialog'), 'layout' => $this->get('dialog'))); $view->assign('theme', $this); } return $view; }
/** * Get plugin View * @access public * @return WFView */ public function &getView() { static $view; if (!is_object($view)) { // create plugin view $view = new WFView(array('base_path' => $this->get('_base_path'), 'template_path' => $this->get('_template_path'), 'name' => $this->get('_name'), 'layout' => $this->get('_layout'))); $view->assign('plugin', $this); } return $view; }
/** * Load a panel view * @access private * @param object $layout Layout (panel) name * @return panel JView object */ private function loadPanel($panel, $state) { $view = new WFView(array('name' => $panel, 'layout' => $panel)); // add tab paths foreach ($this->_paths as $path) { $view->addTemplatePath($path); } // assign panel state to view $view->assign('state', (int) $state); return $view; }
public function getPopupTemplates() { $output = ''; $path = WF_EDITOR_EXTENSIONS . '/popups'; $file = 'default.php'; foreach ($this->getTemplates() as $template) { $wf = WFEditorPlugin::getInstance(); $view = $wf->getView(); $output .= $view->loadTemplate($template); } foreach ($this->getPopups() as $popup) { $view = new WFView(array('name' => $popup, 'base_path' => WF_EDITOR_EXTENSIONS . '/popups/' . $popup, 'template_path' => WF_EDITOR_EXTENSIONS . '/popups/' . $popup . '/tmpl')); $instance = $this->getPopupExtension($popup); $view->assign('popup', $instance); if (file_exists($path . '/' . $popup . '/tmpl/' . $file)) { ob_start(); $output .= '<div id="popup_extension_' . $popup . '" style="display:none;">'; $view->display(); $output .= ob_get_contents(); $output .= '</div>'; ob_end_clean(); } } return $output; }
function execute() { if (JRequest::getVar('json', '', 'POST', 'STRING', 2) || JRequest::getCmd('action') == 'upload') { $this->processXHR(); } else { $this->display(); $document =& WFDocument::getInstance(); $document->pack(); // create plugin view $view = new WFView(array('base_path' => $this->get('base_path'), 'template_path' => $this->get('template_path'), 'name' => 'link', 'layout' => $this->get('layout'))); $view->assign('plugin', $this); // set body output $document->setBody($view->loadTemplate()); $document->render(); } }