Back to AdministratorApplication class

Method render

protected void
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.
Returns
  • void
Since
  • 3.2

Method render - Source code

/**
 * 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.
    $rootUser = $this->get('root_user');
    if (property_exists('\\JConfig', 'root_user')) {
        if (Factory::getUser()->get('username') === $rootUser || Factory::getUser()->id === (string) $rootUser) {
            $this->enqueueMessage(Text::sprintf('JWARNING_REMOVE_ROOT_USER', 'index.php?option=com_config&task=application.removeroot&' . Session::getFormToken() . '=1'), 'warning');
        } elseif (Factory::getUser()->authorise('core.admin')) {
            $this->enqueueMessage(Text::sprintf('JWARNING_REMOVE_ROOT_USER_ADMIN', $rootUser, 'index.php?option=com_config&task=application.removeroot&' . Session::getFormToken() . '=1'), 'warning');
        }
    }
    parent::render();
}