當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JController::display方法代碼示例

本文整理匯總了PHP中JController::display方法的典型用法代碼示例。如果您正苦於以下問題:PHP JController::display方法的具體用法?PHP JController::display怎麽用?PHP JController::display使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JController的用法示例。


在下文中一共展示了JController::display方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: display

 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_COMPONENT . '/helpers/users.php';
     // Load the submenu.
     UsersHelper::addSubmenu(JRequest::getCmd('view', 'users'));
     $view = JRequest::getCmd('view', 'users');
     $layout = JRequest::getCmd('layout', 'default');
     $id = JRequest::getInt('id');
     if (!$this->canView($view)) {
         JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
         return;
     }
     // Check for edit form.
     if ($view == 'user' && $layout == 'edit' && !$this->checkEditId('com_users.edit.user', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=users', false));
         return false;
     } elseif ($view == 'group' && $layout == 'edit' && !$this->checkEditId('com_users.edit.group', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=groups', false));
         return false;
     } elseif ($view == 'level' && $layout == 'edit' && !$this->checkEditId('com_users.edit.level', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=levels', false));
         return false;
     }
     return parent::display();
 }
開發者ID:Simarpreet05,項目名稱:joomla,代碼行數:43,代碼來源:controller.php

示例2: remove

 function remove()
 {
     $cid = JRequest::getVar('cid', array(), 'default', 'array');
     $id = JRequest::getInt('id');
     if (empty($id)) {
         if (!empty($cid) && is_array($cid)) {
             foreach ($cid as $id) {
                 $result = $this->_remove($id);
                 if (!$result) {
                     $this->setRedirect(JURI::base() . 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view') . '&tpl=' . JRequest::getCmd('tpl'), JText::_('FILTER_ERROR_INVALIDID'), 'error');
                     $this->redirect();
                     return;
                 }
             }
         } else {
             $this->setRedirect(JURI::base() . 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view') . '&tpl=' . JRequest::getCmd('tpl'), JText::_('FILTER_ERROR_INVALIDID'), 'error');
             $this->redirect();
             return;
         }
     } else {
         $result = $this->_remove($id);
         if (!$result) {
             $this->setRedirect(JURI::base() . 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view') . '&tpl=' . JRequest::getCmd('tpl'), $this->getError(), 'error');
             $this->redirect();
             return;
         }
     }
     $this->setRedirect(JURI::base() . 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view') . '&tpl=' . JRequest::getCmd('tpl'), JText::_('FILTER_MSG_DELETED'));
     parent::display();
 }
開發者ID:BackupTheBerlios,項目名稱:kmit-svn,代碼行數:30,代碼來源:filtercontrollerparent.php

示例3: display

 function display($cachable = false, $urlparams = false)
 {
     // set default view if not set
     JRequest::setVar('view', JRequest::getCmd('view', 'dashboard'));
     // call parent behavior
     parent::display($cachable);
 }
開發者ID:marsa1985,項目名稱:kazabiz,代碼行數:7,代碼來源:controller.php

示例4: edit

 public function edit()
 {
     JRequest::setVar('view', 'attributeprices_detail');
     JRequest::setVar('layout', 'default');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
開發者ID:jaanusnurmoja,項目名稱:redjoomla,代碼行數:7,代碼來源:attributeprices_detail.php

示例5: iframe

 public function iframe()
 {
     AEPlatform::getInstance()->load_configuration(AEPlatform::getInstance()->get_active_profile());
     parent::display();
     flush();
     JFactory::getApplication()->close();
 }
開發者ID:srbsnkr,項目名稱:sellingonlinemadesimple,代碼行數:7,代碼來源:log.php

示例6: display

 /**
  * Display the view
  */
 function display($cachable = false)
 {
     if (!JRequest::getCmd('view')) {
         JRequest::setVar('view', 'hotelguide');
     }
     parent::display($cachable);
 }
開發者ID:raulrotundo,項目名稱:jpmoser_guide,代碼行數:10,代碼來源:controller.php

示例7: edit

 /**
  * display the edit form
  * @return void
  */
 function edit()
 {
     JRequest::setVar('view', 'company');
     JRequest::setVar('layout', 'form');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
開發者ID:naka211,項目名稱:designcreations1,代碼行數:11,代碼來源:companies.php

示例8: display

 function display()
 {
     $view = JRequest::getCmd('view');
     $theme = JRequest::getVar('theme');
     switch ($view) {
         case 'imageslist':
             if (!empty($theme)) {
                 JRequest::setVar('layout', 'showcase');
             } else {
                 JRequest::setVar('layout', 'default');
             }
             JRequest::setVar('view', 'mediaimageslist');
             JRequest::setVar('model', 'mediaimageslist');
             break;
         default:
             if (!empty($theme)) {
                 JRequest::setVar('layout', 'showcase');
             } else {
                 JRequest::setVar('layout', 'default');
             }
             JRequest::setVar('view', 'media');
             JRequest::setVar('model', 'media');
             break;
     }
     parent::display();
 }
開發者ID:sangkasi,項目名稱:joomla,代碼行數:26,代碼來源:media.php

示例9: display

	function display() {
        // Make sure we have a default view
        if( !JRequest::getVar( 'view' )) {
		    JRequest::setVar('view', 'myapi' );
        }
		parent::display();
	}
開發者ID:rhotog,項目名稱:myApi,代碼行數:7,代碼來源:controller.php

示例10: display

 /**
  * This method controlles the display methods
  */
 function display()
 {
     global $mainframe;
     switch ($this->getTask()) {
         case 'jucene_about':
             JRequest::setVar('hidemainmenu', 0);
             JRequest::setVar('layout', 'jucene_about');
             JRequest::setVar('view', 'jucene');
             break;
         case 'index':
             JRequest::setVar('hidemainmenu', 0);
             JRequest::setVar('layout', 'jucene_index');
             JRequest::setVar('view', 'jucene');
             $this->index();
             break;
         case 'continue':
             JRequest::setVar('hidemainmenu', 0);
             JRequest::setVar('layout', 'jucene_continue');
             JRequest::setVar('view', 'jucene');
             JRequest::setVar('edit', true);
             break;
         default:
             JRequest::setVar('hidemainmenu', 0);
             JRequest::setVar('layout', 'default');
             JRequest::setVar('view', 'jucene');
             JRequest::setVar('edit', true);
             break;
     }
     parent::display();
 }
開發者ID:KIZI,項目名稱:sewebar-cms,代碼行數:33,代碼來源:controller.php

示例11: display

 function display()
 {
     switch ($this->getTask()) {
         case 'add':
             JRequest::setVar('hidemainmenu', 1);
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'company');
             JRequest::setVar('edit', false);
             break;
         case 'edit':
             JRequest::setVar('hidemainmenu', 1);
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'company');
             JRequest::setVar('edit', true);
             break;
         case 'report':
             JRequest::setVar('hidemainmenu', 1);
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'report');
             JRequest::setVar('edit', false);
             break;
     }
     //Set the default view, just in case
     $view = JRequest::getCmd('view');
     if (empty($view)) {
         JRequest::setVar('view', 'companies');
     }
     parent::display();
 }
開發者ID:grlf,項目名稱:eyedock,代碼行數:29,代碼來源:controller.php

示例12: edit

 function edit()
 {
     JRequest::setVar('view', 'bookmark');
     JRequest::setVar('layout', 'edit');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
開發者ID:kaantunc,項目名稱:MYK-BOR,代碼行數:7,代碼來源:bookmark.php

示例13: display

 /**
  * Method to display the view
  *
  * @access	public
  */
 function display()
 {
     if (JRequest::getCmd('view') == '') {
         JRequest::setVar('view', 'main');
     }
     parent::display();
 }
開發者ID:rogatnev-nikita,項目名稱:cloudinterpreter,代碼行數:12,代碼來源:controller.php

示例14: preview

 public function preview()
 {
     JRequest::setVar('view', 'stockroom_detail');
     JRequest::setVar('layout', 'default_product');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
開發者ID:jaanusnurmoja,項目名稱:redjoomla,代碼行數:7,代碼來源:stockroom_detail.php

示例15: dealCouponMgmt

 function dealCouponMgmt()
 {
     $this->checkAccess();
     JRequest::setVar('view', 'merchant');
     JRequest::setVar('task', 'dealCouponMgmt');
     parent::display();
 }
開發者ID:marsa1985,項目名稱:kazabiz,代碼行數:7,代碼來源:merchant.php


注:本文中的JController::display方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。