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


PHP JComponentHelper::renderComponent方法代码示例

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


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

示例1: dispatch

 /**
  * Dispatch the application
  *
  * @param   string  $component  The component which is being rendered.
  *
  * @return  void
  *
  * @since   3.2
  */
 public function dispatch($component = null)
 {
     if ($component === null) {
         $component = JAdministratorHelper::findOption();
     }
     // Load the document to the API
     $this->loadDocument();
     // Set up the params
     $document = JFactory::getDocument();
     // Register the document object with JFactory
     JFactory::$document = $document;
     switch ($document->getType()) {
         case 'html':
             $document->setMetaData('keywords', $this->get('MetaKeys'));
             // Get the template
             $template = $this->getTemplate(true);
             // Store the template and its params to the config
             $this->set('theme', $template->template);
             $this->set('themeParams', $template->params);
             break;
         default:
             break;
     }
     $document->setTitle($this->get('sitename') . ' - ' . JText::_('JADMINISTRATION'));
     $document->setDescription($this->get('MetaDesc'));
     $document->setGenerator('Joomla! - Open Source Content Management');
     $contents = JComponentHelper::renderComponent($component);
     $document->setBuffer($contents, 'component');
     // Trigger the onAfterDispatch event.
     JPluginHelper::importPlugin('system');
     $this->triggerEvent('onAfterDispatch');
 }
开发者ID:sural98,项目名称:joomla-cms,代码行数:41,代码来源:administrator.php

示例2: dispatch

 /**
  * Dispatch the application.
  *
  * Dispatching is the process of pulling the option from the request object and
  * mapping them to a component. If the component does not exist, it handles
  * determining a default component to dispatch.
  *
  * @param   string  $component  The component to dispatch.
  *
  * @return  void
  *
  * @since   11.1
  * @deprecated  4.0
  */
 public function dispatch($component = null)
 {
     $document = JFactory::getDocument();
     $contents = JComponentHelper::renderComponent($component);
     $document->setBuffer($contents, 'component');
     // Trigger the onAfterDispatch event.
     JPluginHelper::importPlugin('system');
     $this->triggerEvent('onAfterDispatch');
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:23,代码来源:application.php

示例3: dispatch

 /**
  * Dispatch the application
  *
  * @param   string
  */
 public function dispatch($component = null)
 {
     // Get the component if not set.
     if (!$component) {
         $component = $this->input->get('option');
     }
     $document = JFactory::getDocument();
     $router = $this->getRouter();
     $params = $this->getParams();
     switch ($document->getType()) {
         case 'html':
             // Get language
             $lang_code = JFactory::getLanguage()->getTag();
             $languages = JLanguageHelper::getLanguages('lang_code');
             // Set metadata
             if (isset($languages[$lang_code]) && $languages[$lang_code]->metakey) {
                 $document->setMetaData('keywords', $languages[$lang_code]->metakey);
             } else {
                 $document->setMetaData('keywords', $this->getCfg('MetaKeys'));
             }
             $document->setMetaData('rights', $this->getCfg('MetaRights'));
             if ($router->getMode() == JROUTER_MODE_SEF) {
                 $document->setBase(htmlspecialchars(JUri::current()));
             }
             break;
         case 'feed':
             $document->setBase(htmlspecialchars(JUri::current()));
             break;
     }
     $document->setTitle($params->get('page_title'));
     $document->setDescription($params->get('page_description'));
     // Add version number or not based on global configuration
     if ($this->getCfg('MetaVersion', 0)) {
         $document->setGenerator('Joomla! - Open Source Content Management  - Version ' . JVERSION);
     } else {
         $document->setGenerator('Joomla! - Open Source Content Management');
     }
     $contents = JComponentHelper::renderComponent($component);
     $document->setBuffer($contents, 'component');
     // Trigger the onAfterDispatch event.
     JPluginHelper::importPlugin('system');
     $this->triggerEvent('onAfterDispatch');
 }
开发者ID:TFToto,项目名称:playjoom-builds,代码行数:48,代码来源:application.php

示例4: dispatch

 /**
  * Dispatch the application
  *
  * @access public
  */
 function dispatch($component)
 {
     $document =& JFactory::getDocument();
     $user =& JFactory::getUser();
     switch ($document->getType()) {
         case 'html':
             $document->setMetaData('keywords', $this->getCfg('MetaKeys'));
             if ($user->get('id')) {
                 $document->addScript(JURI::root(true) . '/includes/js/joomla.javascript.js');
             }
             JHTML::_('behavior.mootools');
             break;
         default:
             break;
     }
     $document->setTitle(htmlspecialchars_decode($this->getCfg('sitename')) . ' - ' . JText::_('Administration'));
     $document->setDescription($this->getCfg('MetaDesc'));
     $contents = JComponentHelper::renderComponent($component);
     $document->setBuffer($contents, 'component');
 }
开发者ID:esumerfd,项目名称:ssol_joomla,代码行数:25,代码来源:application.php

示例5: dispatch

 /**
  * Dispatch the application
  *
  * @param	string
  */
 public function dispatch($component = null)
 {
     try {
         // Get the component if not set.
         if (!$component) {
             $component = JRequest::getCmd('option');
         }
         $document = JFactory::getDocument();
         $user = JFactory::getUser();
         $router = $this->getRouter();
         $params = $this->getParams();
         switch ($document->getType()) {
             case 'html':
                 // Get language
                 $lang_code = JFactory::getLanguage()->getTag();
                 $languages = JLanguageHelper::getLanguages('lang_code');
                 // Set metadata
                 if (isset($languages[$lang_code]) && $languages[$lang_code]->metakey) {
                     $document->setMetaData('keywords', $languages[$lang_code]->metakey);
                 } else {
                     $document->setMetaData('keywords', $this->getCfg('MetaKeys'));
                 }
                 $document->setMetaData('rights', $this->getCfg('MetaRights'));
                 if ($router->getMode() == JROUTER_MODE_SEF) {
                     $document->setBase(htmlspecialchars(JURI::current()));
                 }
                 break;
             case 'feed':
                 $document->setBase(htmlspecialchars(JURI::current()));
                 break;
         }
         $document->setTitle($params->get('page_title'));
         $document->setDescription($params->get('page_description'));
         // Add version number or not based on global configuration
         if ($this->getCfg('MetaVersion', 0)) {
             $document->setGenerator('HUBzero - The open source platform for scientific and educational collaboration (version ' . \Hubzero\Version\Version::VERSION . ')');
         } else {
             $document->setGenerator('HUBzero - The open source platform for scientific and educational collaboration');
         }
         $contents = JComponentHelper::renderComponent($component);
         $document->setBuffer($contents, 'component');
         // Trigger the onAfterDispatch event.
         JPluginHelper::importPlugin('system');
         $this->triggerEvent('onAfterDispatch');
     } catch (Exception $e) {
         $code = $e->getCode();
         JError::raiseError($code ? $code : 500, $e->getMessage());
     }
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:54,代码来源:application.php

示例6: dispatch

 /**
  * Dispatch the application
  *
  * @param	string	$component	The component to dispatch.
  *
  * @return	void
  * @since	1.5
  */
 public function dispatch($component = null)
 {
     try {
         if ($component === null) {
             $component = JAdministratorHelper::findOption();
         }
         $document = JFactory::getDocument();
         $user = JFactory::getUser();
         switch ($document->getType()) {
             case 'html':
                 $document->setMetaData('keywords', $this->getCfg('MetaKeys'));
                 break;
             default:
                 break;
         }
         $document->setTitle($this->getCfg('sitename') . ' - ' . JText::_('JADMINISTRATION'));
         $document->setDescription($this->getCfg('MetaDesc'));
         $document->setGenerator('Jokte! - CMS Lationamericano Cien por Ciento Libre');
         $contents = JComponentHelper::renderComponent($component);
         $document->setBuffer($contents, 'component');
         // Trigger the onAfterDispatch event.
         JPluginHelper::importPlugin('system');
         $this->triggerEvent('onAfterDispatch');
     } catch (Exception $e) {
         $code = $e->getCode();
         JError::raiseError($code ? $code : 500, $e->getMessage());
     }
 }
开发者ID:networksoft,项目名称:seekerplus2.com,代码行数:36,代码来源:application.php

示例7: dispatch

 /**
  * Dispatch the application
  *
  * @param   string  $component  The component which is being rendered.
  *
  * @return  void
  *
  * @since   3.2
  */
 public function dispatch($component = null)
 {
     // Get the component if not set.
     if (!$component) {
         $component = $this->input->getCmd('option', null);
     }
     // Load the document to the API
     $this->loadDocument();
     // Set up the params
     $document = $this->getDocument();
     $router = static::getRouter();
     $params = $this->getParams();
     // Register the document object with JFactory
     JFactory::$document = $document;
     switch ($document->getType()) {
         case 'html':
             // Get language
             $lang_code = $this->getLanguage()->getTag();
             $languages = JLanguageHelper::getLanguages('lang_code');
             // Set metadata
             if (isset($languages[$lang_code]) && $languages[$lang_code]->metakey) {
                 $document->setMetaData('keywords', $languages[$lang_code]->metakey);
             } else {
                 $document->setMetaData('keywords', $this->get('MetaKeys'));
             }
             $document->setMetaData('rights', $this->get('MetaRights'));
             if ($router->getMode() == JROUTER_MODE_SEF) {
                 $document->setBase(htmlspecialchars(JUri::current()));
             }
             // Get the template
             $template = $this->getTemplate(true);
             // Store the template and its params to the config
             $this->set('theme', $template->template);
             $this->set('themeParams', $template->params);
             break;
         case 'feed':
             $document->setBase(htmlspecialchars(JUri::current()));
             break;
     }
     $document->setTitle($params->get('page_title'));
     $document->setDescription($params->get('page_description'));
     // Add version number or not based on global configuration
     if ($this->get('MetaVersion', 0)) {
         $document->setGenerator('Joomla! - Open Source Content Management. Translated by JoomlaFarsi.com  - Version ' . JVERSION);
     } else {
         $document->setGenerator('Joomla! - Open Source Content Management. Translated by JoomlaFarsi.com');
     }
     $contents = JComponentHelper::renderComponent($component);
     $document->setBuffer($contents, 'component');
     // Trigger the onAfterDispatch event.
     JPluginHelper::importPlugin('system');
     $this->triggerEvent('onAfterDispatch');
 }
开发者ID:aslanshvili,项目名称:tandis-rayaneh,代码行数:62,代码来源:site.php

示例8: dispatch

 /**
  * Dispatch the application
  *
  * @param   string    $component    The component to dispatch.
  *
  * @return  void
  * @since   1.5
  */
 public function dispatch($component = null)
 {
     if ($component === null) {
         $component = JAdministratorHelper::findOption();
     }
     $document = JFactory::getDocument();
     switch ($document->getType()) {
         case 'html':
             $document->setMetaData('keywords', $this->getCfg('MetaKeys'));
             break;
         default:
             break;
     }
     $document->setTitle($this->getCfg('sitename') . ' - ' . JText::_('JADMINISTRATION'));
     $document->setDescription($this->getCfg('MetaDesc'));
     $document->setGenerator('Joomla! - Open Source Content Management');
     $contents = JComponentHelper::renderComponent($component);
     $document->setBuffer($contents, 'component');
     // Trigger the onAfterDispatch event.
     JPluginHelper::importPlugin('system');
     $this->triggerEvent('onAfterDispatch');
 }
开发者ID:TFToto,项目名称:playjoom-builds,代码行数:30,代码来源:application.php

示例9: dispatch

	/**
	 * Dispatch the application
	 *
	 * @access public
	 */
	function dispatch($component)
	{
		$document	=& JFactory::getDocument();
		$user		=& JFactory::getUser();
		$router     =& $this->getRouter();
		$params     =& $this->getParams();

		switch($document->getType())
		{
			case 'html':
			{
				if ( $user->get('id') ) {
					$document->addScript( JURI::root(true).'/media/system/js/legacy.js');
				}

				if($router->getMode() == JROUTER_MODE_SEF) {
					$document->setBase(JURI::current());
				}
			} break;

			case 'feed':
			{
				$document->setBase(JURI::current());
			} break;

			default: break;
		}


		$document->setTitle( $params->get('page_title') );
		$document->setDescription( $params->get('page_description') );

		$contents = JComponentHelper::renderComponent($component);
		$document->setBuffer( $contents, 'component');
	}
开发者ID:raeldc,项目名称:com_learn,代码行数:40,代码来源:application.php

示例10: dispatch

 /**
  * Dispatch the application
  *
  * @param	string
  */
 public function dispatch($component = null)
 {
     try {
         // Get the component if not set.
         if (!$component) {
             $component = JRequest::getCmd('option');
         }
         $document = JFactory::getDocument();
         $user = JFactory::getUser();
         $router = $this->getRouter();
         $params = $this->getParams();
         switch ($document->getType()) {
             case 'html':
                 // Get language
                 $lang_code = JFactory::getLanguage()->getTag();
                 $languages = JLanguageHelper::getLanguages('lang_code');
                 // Set metadata
                 if (isset($languages[$lang_code]) && $languages[$lang_code]->metakey) {
                     $document->setMetaData('keywords', $languages[$lang_code]->metakey);
                 } else {
                     $document->setMetaData('keywords', $this->getCfg('MetaKeys'));
                 }
                 $document->setMetaData('rights', $this->getCfg('MetaRights'));
                 $document->setMetaData('language', $lang_code);
                 if ($router->getMode() == JROUTER_MODE_SEF) {
                     $document->setBase(JURI::current());
                 }
                 break;
             case 'feed':
                 $document->setBase(JURI::current());
                 break;
         }
         $document->setTitle($params->get('page_title'));
         $document->setDescription($params->get('page_description'));
         $contents = JComponentHelper::renderComponent($component);
         $document->setBuffer($contents, 'component');
         // Trigger the onAfterDispatch event.
         JPluginHelper::importPlugin('system');
         $this->triggerEvent('onAfterDispatch');
     } catch (Exception $e) {
         $code = $e->getCode();
         JError::raiseError($code ? $code : 500, $e->getMessage());
     }
 }
开发者ID:akksi,项目名称:jcg,代码行数:49,代码来源:application.php

示例11: dispatch

 /**
  * Dispatch the application
  *
  * @access public
  */
 function dispatch($component)
 {
     $document =& JFactory::getDocument();
     $user =& JFactory::getUser();
     $router =& $this->getRouter();
     $params =& $this->getParams();
     switch ($document->getType()) {
         case 'html':
             //set metadata
             $document->setMetaData('keywords', $this->getCfg('MetaKeys'));
             if ($user->get('id')) {
                 $document->addScript(JURI::root(true) . '/includes/js/joomla.javascript.js');
             }
             if ($router->getMode() == JROUTER_MODE_SEF) {
                 $document->setBase(JURI::current());
             }
             break;
         case 'feed':
             $document->setBase(JURI::current());
             break;
         default:
             break;
     }
     $document->setTitle($params->get('page_title'));
     $document->setDescription($params->get('page_description'));
     $contents = JComponentHelper::renderComponent($component);
     $document->setBuffer($contents, 'component');
 }
开发者ID:Fellah,项目名称:govnobaki,代码行数:33,代码来源:application.php

示例12: dispatch

 /**
  * Dispatch the application
  *
  * @param	string
  */
 public function dispatch($component = null)
 {
     // Get the component if not set.
     if (!$component) {
         $component = JRequest::getCmd('option');
     }
     $document =& JFactory::getDocument();
     $user =& JFactory::getUser();
     $router =& $this->getRouter();
     $params =& $this->getParams();
     switch ($document->getType()) {
         case 'html':
             //set metadata
             $document->setMetaData('keywords', $this->getCfg('MetaKeys'));
             if ($router->getMode() == JROUTER_MODE_SEF) {
                 $document->setBase(JURI::current());
             }
             break;
         case 'feed':
             $document->setBase(JURI::current());
             break;
     }
     $document->setTitle($params->get('page_title'));
     $document->setDescription($params->get('page_description'));
     $contents = JComponentHelper::renderComponent($component);
     $document->setBuffer($contents, 'component');
     // Trigger the onAfterDispatch event.
     JPluginHelper::importPlugin('system');
     $this->triggerEvent('onAfterDispatch');
 }
开发者ID:joebushi,项目名称:joomla,代码行数:35,代码来源:application.php

示例13: dispatch

 /**
  * Dispatch the applicaiton.
  *
  * Dispatching is the process of pulling the option from the request object and
  * mapping them to a component. If the component does not exist, it handles
  * determining a default component to dispatch.
  *
  * @abstract
  * @access	public
  */
 function dispatch($component)
 {
     $document =& JFactory::getDocument();
     $document->setTitle($this->getCfg('sitename') . ' - ' . JText::_('Administration'));
     $document->setDescription($this->getCfg('MetaDesc'));
     $contents = JComponentHelper::renderComponent($component);
     $document->setBuffer($contents, 'component');
 }
开发者ID:walteraries,项目名称:anahita,代码行数:18,代码来源:application.php

示例14: dispatch

 /**
  * Dispatch the application
  *
  * @access public
  * @throws KDispatcherException	If the user is not logged in.
  */
 function dispatch()
 {
     $document = JFactory::getDocument();
     switch ($document->getType()) {
         case 'html':
             $document->addScript(JURI::root(true) . '/media/system/js/legacy.js');
             JHTML::_('behavior.mootools');
     }
     $document->setTitle(htmlspecialchars_decode($this->getCfg('sitename')) . ' - ' . JText::_('Administration'));
     if (JFactory::getUser()->get('guest')) {
         $option = 'com_users';
     } else {
         $option = strtolower(JRequest::getCmd('option', 'com_dashboard'));
     }
     JRequest::setVar('option', $option);
     $contents = JComponentHelper::renderComponent($option);
     $document->setBuffer($contents, 'component');
 }
开发者ID:JSWebdesign,项目名称:intranet-platform,代码行数:24,代码来源:application.php

示例15: dispatch

 /**
  * Dispatch the application.
  *
  * Dispatching is the process of pulling the option from the request object and
  * mapping them to a component. If the component does not exist, it handles
  * determining a default component to dispatch.
  *
  * @param   string  $component  The component to dispatch.
  *
  * @return  void
  *
  * @since   11.1
  */
 public function dispatch($component = null)
 {
     $document = JFactory::getDocument();
     $document->setTitle($this->getCfg('sitename') . ' - ' . JText::_('JADMINISTRATION'));
     $document->setDescription($this->getCfg('MetaDesc'));
     $contents = JComponentHelper::renderComponent($component);
     $document->setBuffer($contents, 'component');
     // Trigger the onAfterDispatch event.
     JPluginHelper::importPlugin('system');
     $this->triggerEvent('onAfterDispatch');
 }
开发者ID:brojask,项目名称:colegio-abogados-joomla,代码行数:24,代码来源:application.php


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