original_string: protected function doRender(array $options)
      {
          if (!isset($this->templateEngine)) {
              throw new InvalidArgumentException('Missing template engine');
          }
  
          if (!isset($this->label)) {
              throw new InvalidArgumentException('Missing provider label');
          }
  
          if (isset($options[$this->label])) {
              $options = array_merge($this->options, $options[$this->label], $options);
              unset($options[$this->label]);
          } else {
              $options = $options + $this->options;
          }
  
          $template = sprintf(
              'EzSystemsShareButtonsBundle::%s/%s',
              $this->templateName,
              $options['template']
          );
  
          return $this->templateEngine->render($template, $options);
      }
code: protected function doRender(array $options)
      {
          if (!isset($this->templateEngine)) {
              throw new InvalidArgumentException('Missing template engine');
          }
  
          if (!isset($this->label)) {
              throw new InvalidArgumentException('Missing provider label');
          }
  
          if (isset($options[$this->label])) {
              $options = array_merge($this->options, $options[$this->label], $options);
              unset($options[$this->label]);
          } else {
              $options = $options + $this->options;
          }
  
          $template = sprintf(
              'EzSystemsShareButtonsBundle::%s/%s',
              $this->templateName,
              $options['template']
          );
  
          return $this->templateEngine->render($template, $options);
      }
code_tokens: protected function doRender ( array $ options ) { if ( ! isset ( $ this -> templateEngine ) ) { throw new InvalidArgumentException ( 'Missing template engine' ) ; } if ( ! isset ( $ this -> label ) ) { throw new InvalidArgumentException ( 'Missing provider label' ) ; } if ( isset ( $ options [ $ this -> label ] ) ) { $ options = array_merge ( $ this -> options , $ options [ $ this -> label ] , $ options ) ; unset ( $ options [ $ this -> label ] ) ; } else { $ options = $ options + $ this -> options ; } $ template = sprintf ( 'EzSystemsShareButtonsBundle::%s/%s' , $ this -> templateName , $ options [ 'template' ] ) ; return $ this -> templateEngine -> render ( $ template , $ options ) ; }
docstring: Performs share button rendering.
  
  @param array $options
  
  @return string
  
  @throws \InvalidArgumentException if template engine is not set
  @throws \InvalidArgumentException if provider label is not set
docstring_tokens: Performs share button rendering .