本文整理汇总了PHP中WFView::assign方法的典型用法代码示例。如果您正苦于以下问题:PHP WFView::assign方法的具体用法?PHP WFView::assign怎么用?PHP WFView::assign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WFView
的用法示例。
在下文中一共展示了WFView::assign方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* 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();
}
示例2: WFView
/**
* 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;
}
示例3: WFView
/**
* 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;
}
示例4: loadPanel
/**
* 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;
}
示例5: getPopupTemplates
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;
}
示例6: execute
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();
}
}