original_string: public function renderComponent($name, $parameters = [])
      {
          $result = null;
          $previousContext = $this->componentContext;
  
          if ($componentObj = $this->findComponentByName($name)) {
              $componentObj->id = uniqid($name);
              $componentObj->setProperties(array_merge($componentObj->getProperties(), $parameters));
              $this->componentContext = $componentObj;
              $result = $componentObj->onRender();
          }
  
          if (!$result) {
              $result = $this->renderPartial($name.'::default', [], false);
          }
  
          $this->componentContext = $previousContext;
          return $result;
      }
code: public function renderComponent($name, $parameters = [])
      {
          $result = null;
          $previousContext = $this->componentContext;
  
          if ($componentObj = $this->findComponentByName($name)) {
              $componentObj->id = uniqid($name);
              $componentObj->setProperties(array_merge($componentObj->getProperties(), $parameters));
              $this->componentContext = $componentObj;
              $result = $componentObj->onRender();
          }
  
          if (!$result) {
              $result = $this->renderPartial($name.'::default', [], false);
          }
  
          $this->componentContext = $previousContext;
          return $result;
      }
code_tokens: public function renderComponent ( $ name , $ parameters = [ ] ) { $ result = null ; $ previousContext = $ this -> componentContext ; if ( $ componentObj = $ this -> findComponentByName ( $ name ) ) { $ componentObj -> id = uniqid ( $ name ) ; $ componentObj -> setProperties ( array_merge ( $ componentObj -> getProperties ( ) , $ parameters ) ) ; $ this -> componentContext = $ componentObj ; $ result = $ componentObj -> onRender ( ) ; } if ( ! $ result ) { $ result = $ this -> renderPartial ( $ name . '::default' , [ ] , false ) ; } $ this -> componentContext = $ previousContext ; return $ result ; }
docstring: Renders a component's default content, preserves the previous component context.
  @param $name
  @param array $parameters
  @return string Returns the component default contents.
docstring_tokens: Renders a component s default content preserves the previous component context .