本文整理汇总了PHP中JApplicationCms::render方法的典型用法代码示例。如果您正苦于以下问题:PHP JApplicationCms::render方法的具体用法?PHP JApplicationCms::render怎么用?PHP JApplicationCms::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JApplicationCms
的用法示例。
在下文中一共展示了JApplicationCms::render方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Rendering is the process of pushing the document buffers into the template
* placeholders, retrieving data from the document and pushing it into
* the application response buffer.
*
* @return void
*
* @since 3.2
*/
protected function render()
{
switch ($this->document->getType()) {
case 'feed':
// No special processing for feeds
break;
case 'html':
default:
$template = $this->getTemplate(true);
$file = $this->input->get('tmpl', 'index');
if (!$this->get('offline') && $file == 'offline') {
$this->set('themeFile', 'index.php');
}
if ($this->get('offline') && !JFactory::getUser()->authorise('core.login.offline')) {
$this->setUserState('users.login.form.data', array('return' => JUri::getInstance()->toString()));
$this->set('themeFile', 'offline.php');
$this->setHeader('Status', '503 Service Temporarily Unavailable', 'true');
}
if (!is_dir(JPATH_THEMES . '/' . $template->template) && !$this->get('offline')) {
$this->set('themeFile', 'component.php');
}
// Ensure themeFile is set by now
if ($this->get('themeFile') == '') {
$this->set('themeFile', $file . '.php');
}
break;
}
parent::render();
}
示例2: render
/**
* Rendering is the process of pushing the document buffers into the template
* placeholders, retrieving data from the document and pushing it into
* the application response buffer.
*
* @return void
*
* @since 3.2
*/
protected function render()
{
// Get the JInput object
$input = $this->input;
$component = $input->getCmd('option', 'com_users');
$view = $input->getCmd('view', 'login');
$file = $input->getCmd('tmpl', 'index');
if ($component == 'com_users' && $view == 'login') {
$file = 'login';
}
$this->set('themeFile', $file . '.php');
parent::render();
}
示例3: render
/**
* Rendering is the process of pushing the document buffers into the template
* placeholders, retrieving data from the document and pushing it into
* the application response buffer.
*
* @return void
*
* @since 3.2
*/
protected function render()
{
// Get the JInput object
$input = $this->input;
$component = $input->getCmd('option', 'com_login');
$file = $input->getCmd('tmpl', 'index');
if ($component == 'com_login') {
$file = 'login';
}
$this->set('themeFile', $file . '.php');
// Safety check for when configuration.php root_user is in use.
$config = JFactory::getConfig();
$rootUser = $config->get('root_user');
if (property_exists('JConfig', 'root_user') && (JFactory::getUser()->get('username') == $rootUser || JFactory::getUser()->id === (string) $rootUser)) {
$this->enqueueMessage(JText::sprintf('JWARNING_REMOVE_ROOT_USER', 'index.php?option=com_config&task=application.removeroot&' . JSession::getFormToken() . '=1'), 'notice');
}
parent::render();
}
示例4: render
/**
* Rendering is the process of pushing the document buffers into the template
* placeholders, retrieving data from the document and pushing it into
* the application response buffer.
*
* @return void
*
* @since 3.2
*/
protected function render()
{
switch ($this->document->getType()) {
case 'feed':
// No special processing for feeds
break;
case 'html':
default:
$template = $this->getTemplate(true);
$file = $this->input->get('tmpl', 'index');
if (!is_dir(JPATH_THEMES . '/' . $template->template)) {
$this->set('themeFile', 'component.php');
}
// Ensure themeFile is set by now
if ($this->get('themeFile') == '') {
$this->set('themeFile', $file . '.php');
}
break;
}
parent::render();
}