当前位置: 首页>>代码示例>>PHP>>正文


PHP JController::getView方法代码示例

本文整理汇总了PHP中JController::getView方法的典型用法代码示例。如果您正苦于以下问题:PHP JController::getView方法的具体用法?PHP JController::getView怎么用?PHP JController::getView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JController的用法示例。


在下文中一共展示了JController::getView方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getView

 function getView($name = '', $type = 'html', $prefix = '', $config = array())
 {
     if ($name) {
         $config['template_path'] = $this->basepath . DS . "views" . DS . strtolower($name) . DS . "tmpl";
     } else {
         $config['template_path'] = $this->basepath . DS . "views" . DS . strtolower($this->modulename) . DS . "tmpl";
     }
     return parent::getView($name, $type, 'JTheFactoryView' . ucfirst($this->modulename), $config);
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:9,代码来源:admin.controller.php

示例2: array

 function &getView($name = '', $type = '', $prefix = 'hotelguideView', $config = array())
 {
     if (empty($type)) {
         $document =& JFactory::getDocument();
         $type = $document->getType();
     }
     if (empty($prefix)) {
         $prefix = 'hotelguideView';
     }
     $view =& parent::getView($name, $type, $prefix, $config);
     return $view;
 }
开发者ID:raulrotundo,项目名称:jpmoser_guide,代码行数:12,代码来源:controller.php

示例3: Display

 /**
  * The default task,
  * Add the required models and display the view
  */
 function Display()
 {
     $userModel = JController::getModel("Users");
     //Checks for new user
     switch ($userModel->checkUser()) {
         case 0:
             $viewName = "newuser";
             break;
         case 1:
             $viewName = "newuser";
             break;
         case 2:
             //Get the viewname
             $viewName = JRequest::getVar('view', 'home');
             break;
         default:
             $viewName = "newuser";
             break;
     }
     //Get the view
     $view = JController::getView($viewName, 'html');
     //Get the models that all views need
     $stocksModel = JController::getModel("Stocks");
     $portfolioModel = JController::getModel("Portfolio");
     $userModel = JController::getModel("Users");
     //Add the models every view needs
     $view->setModel($stocksModel);
     $view->setModel($portfolioModel);
     $view->setModel($userModel);
     //Some additional models
     if ($viewName == "history") {
         $view->setModel(JController::getModel("History"));
     }
     if ($viewName == 'dealcards') {
         $view->setModel(JController::getModel("Cards"));
     }
     if ($viewName == 'home') {
         $view->setModel(JController::getModel("Cards"));
         $view->setModel(JController::getModel("Log"));
     }
     //Display the view
     $view->display();
 }
开发者ID:Rayman,项目名称:Beursplein-5,代码行数:47,代码来源:controller.php

示例4: array

 function &getView($name = '', $type = '', $prefix = '', $config = array())
 {
     $config['base_path'] = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'table' . DS . 'emailtableplus';
     return parent::getView($name, $type, $prefix, $config);
 }
开发者ID:nikshade,项目名称:fabrik21,代码行数:5,代码来源:emailtableplus.php

示例5: getView

 /**
  * Create the View. 
  * This is an overloaded function of JController::getView 
  * and includes addition of the JDocument Object with required scripts and styles
  * @return object
  */
 public function getView($name = '', $type = '', $prefix = '', $config = array())
 {
     $language = JFactory::getLanguage();
     $language->load('com_jce', JPATH_ADMINISTRATOR);
     $document = JFactory::getDocument();
     if (!$name) {
         $name = JRequest::getWord('view', 'cpanel');
     }
     if (!$type) {
         $type = $document->getType();
     }
     if (empty($config)) {
         $config = array('base_path' => dirname(__FILE__));
     }
     $view = parent::getView($name, $type, $prefix, $config);
     $document = JFactory::getDocument();
     $document->setTitle(WFText::_('WF_ADMINISTRATION') . ' :: ' . WFText::_('WF_' . strtoupper($name)));
     $model = $this->getModel($name);
     // jquery versions
     $document->addScript(JURI::root(true) . '/components/com_jce/editor/libraries/js/jquery/jquery-' . WF_JQUERY . '.min.js?version=' . $model->getVersion());
     $document->addScript(JURI::root(true) . '/components/com_jce/editor/libraries/js/jquery/jquery-ui-' . WF_JQUERYUI . '.custom.min.js?version=' . $model->getVersion());
     // jQuery noConflict
     $document->addScriptDeclaration('jQuery.noConflict();');
     $scripts = array();
     switch ($name) {
         case 'help':
             $scripts[] = 'help.js';
             break;
         default:
             // load Joomla! core javascript
             if (method_exists('JHtml', 'core')) {
                 JHtml::core();
             }
             require_once JPATH_ADMINISTRATOR . DS . 'includes' . DS . 'toolbar.php';
             JToolBarHelper::title(WFText::_('WF_ADMINISTRATION') . ' ›› ' . WFText::_('WF_' . strtoupper($name)), 'logo.png');
             $params = WFParameterHelper::getComponentParams();
             $theme = $params->get('preferences.theme', 'jce');
             $scripts = array_merge(array('tips.js', 'html5.js'));
             // Load admin scripts
             $document->addScript(JURI::root(true) . '/administrator/components/com_jce/media/js/jce.js?version=' . $model->getVersion());
             $options = array('labels' => array('ok' => WFText::_('WF_LABEL_OK'), 'cancel' => WFText::_('WF_LABEL_CANCEL'), 'select' => WFText::_('WF_LABEL_SELECT'), 'save' => WFText::_('WF_LABEL_SAVE'), 'saveclose' => WFText::_('WF_LABEL_SAVECLOSE'), 'alert' => WFText::_('WF_LABEL_ALERT'), 'required' => WFText::_('WF_MESSAGE_REQUIRED')));
             $document->addScriptDeclaration('jQuery(document).ready(function($){$.jce.init(' . json_encode($options) . ');});');
             $view->addHelperPath(dirname(__FILE__) . DS . 'helpers');
             $this->addModelPath(dirname(__FILE__) . DS . 'models');
             $view->loadHelper('toolbar');
             $view->loadHelper('tools');
             $view->loadHelper('xml');
             $view->loadHelper($name);
             $this->loadMenu();
             break;
     }
     if ($model = $this->getModel($name)) {
         $view->setModel($model, true);
     }
     // Load site scripts
     foreach ($scripts as $script) {
         $document->addScript(JURI::root(true) . '/components/com_jce/editor/libraries/js/' . $script . '?version=' . $model->getVersion());
     }
     require_once dirname(__FILE__) . DS . 'helpers' . DS . 'system.php';
     $app = JFactory::getApplication();
     $app->registerEvent('onAfterRender', 'WFSystemHelper');
     $view->assignRef('document', $document);
     return $view;
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:70,代码来源:controller.php

示例6: getView

 /**
  * Override of j!'s getView
  *
  * Method to get a reference to the current view and load it if necessary.
  *
  * @param   string  $name    The view name. Optional, defaults to the controller name.
  * @param   string  $type    The view type. Optional.
  * @param   string  $prefix  The class prefix. Optional.
  * @param   array   $config  Configuration array for view. Optional.
  *
  */
 public function getView($name = '', $type = '', $prefix = '', $config = array())
 {
     $viewName = str_replace('FabrikControllerVisualization', '', get_class($this));
     $viewName = $viewName == '' ? $this->getViewName() : $name;
     return parent::getView($viewName, $type, $prefix, $config);
 }
开发者ID:rhotog,项目名称:fabrik,代码行数:17,代码来源:visualization.php

示例7: getView

 function getView($name = '')
 {
     return parent::getView($name, 'html');
 }
开发者ID:nikshade,项目名称:fabrik21,代码行数:4,代码来源:article.php


注:本文中的JController::getView方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。