original_string: public function onResponse(FilterResponseEvent $event) {
      $response = $event->getResponse();
  
      $node = $this->getObject($response, 'node');
  
      if ($node === FALSE) {
        return;
      }
  
      $links = array_merge(
        $this->generateEntityReferenceLinks($node),
        $this->generateRelatedMediaLinks($node),
        $this->generateRestLinks($node)
      );
  
      // Add the link headers to the response.
      if (empty($links)) {
        return;
      }
  
      $response->headers->set('Link', $links, FALSE);
    }
code: public function onResponse(FilterResponseEvent $event) {
      $response = $event->getResponse();
  
      $node = $this->getObject($response, 'node');
  
      if ($node === FALSE) {
        return;
      }
  
      $links = array_merge(
        $this->generateEntityReferenceLinks($node),
        $this->generateRelatedMediaLinks($node),
        $this->generateRestLinks($node)
      );
  
      // Add the link headers to the response.
      if (empty($links)) {
        return;
      }
  
      $response->headers->set('Link', $links, FALSE);
    }
code_tokens: public function onResponse ( FilterResponseEvent $ event ) { $ response = $ event -> getResponse ( ) ; $ node = $ this -> getObject ( $ response , 'node' ) ; if ( $ node === FALSE ) { return ; } $ links = array_merge ( $ this -> generateEntityReferenceLinks ( $ node ) , $ this -> generateRelatedMediaLinks ( $ node ) , $ this -> generateRestLinks ( $ node ) ) ; // Add the link headers to the response. if ( empty ( $ links ) ) { return ; } $ response -> headers -> set ( 'Link' , $ links , FALSE ) ; }
docstring: Adds node-specific link headers to appropriate responses.
  
  @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
  Event containing the response.
docstring_tokens: Adds node - specific link headers to appropriate responses .