original_string: public function display($tpl = null)
      {
          $attributes = array();
          $query = array();
  
          $app = JFactory::getApplication();
          $input = $app->input;
  
          $routeName = $input->get('route', null, 'string');
          $path = $input->get('path', null, 'string');
  
          $route = self::$router->getRouteCollection()->get($routeName);
          $defaults = $route->getDefaults();
  
          if ($path !== null) {
              $path = rtrim($route->getPath(), '/') . '/' . $path;
              $defaults = self::$router->match($path, null, false);
          }
  
          unset($attributes['_controller']);
  
          foreach ($defaults as $key => $default) {
              if (!isset($attributes[$key])) {
                  $attributes[$key] = $default;
              }
          }
  
          $subRequest = self::$requestStack->getCurrentRequest()->duplicate($query, null, $attributes);
  
          $this->response = self::$kernel->handle(
              $subRequest,
              \Symfony\Component\HttpKernel\HttpKernelInterface::SUB_REQUEST,
              false
          );
  
              // Display the view
          parent::display($tpl);
      }
code: public function display($tpl = null)
      {
          $attributes = array();
          $query = array();
  
          $app = JFactory::getApplication();
          $input = $app->input;
  
          $routeName = $input->get('route', null, 'string');
          $path = $input->get('path', null, 'string');
  
          $route = self::$router->getRouteCollection()->get($routeName);
          $defaults = $route->getDefaults();
  
          if ($path !== null) {
              $path = rtrim($route->getPath(), '/') . '/' . $path;
              $defaults = self::$router->match($path, null, false);
          }
  
          unset($attributes['_controller']);
  
          foreach ($defaults as $key => $default) {
              if (!isset($attributes[$key])) {
                  $attributes[$key] = $default;
              }
          }
  
          $subRequest = self::$requestStack->getCurrentRequest()->duplicate($query, null, $attributes);
  
          $this->response = self::$kernel->handle(
              $subRequest,
              \Symfony\Component\HttpKernel\HttpKernelInterface::SUB_REQUEST,
              false
          );
  
              // Display the view
          parent::display($tpl);
      }
code_tokens: public function display ( $ tpl = null ) { $ attributes = array ( ) ; $ query = array ( ) ; $ app = JFactory :: getApplication ( ) ; $ input = $ app -> input ; $ routeName = $ input -> get ( 'route' , null , 'string' ) ; $ path = $ input -> get ( 'path' , null , 'string' ) ; $ route = self :: $ router -> getRouteCollection ( ) -> get ( $ routeName ) ; $ defaults = $ route -> getDefaults ( ) ; if ( $ path !== null ) { $ path = rtrim ( $ route -> getPath ( ) , '/' ) . '/' . $ path ; $ defaults = self :: $ router -> match ( $ path , null , false ) ; } unset ( $ attributes [ '_controller' ] ) ; foreach ( $ defaults as $ key => $ default ) { if ( ! isset ( $ attributes [ $ key ] ) ) { $ attributes [ $ key ] = $ default ; } } $ subRequest = self :: $ requestStack -> getCurrentRequest ( ) -> duplicate ( $ query , null , $ attributes ) ; $ this -> response = self :: $ kernel -> handle ( $ subRequest , \ Symfony \ Component \ HttpKernel \ HttpKernelInterface :: SUB_REQUEST , false ) ; // Display the view parent :: display ( $ tpl ) ; }
docstring: Display the Hello World view
  
  @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  
  @return  void
docstring_tokens: Display the Hello World view