Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DataPart.php

function DataPart::getPreparedHeaders

Overrides TextPart::getPreparedHeaders

File

vendor/symfony/mime/Part/DataPart.php, line 92

Class

DataPart
@author Fabien Potencier <fabien@symfony.com>

Namespace

Symfony\Component\Mime\Part

Code

public function getPreparedHeaders() : Headers {
    $headers = parent::getPreparedHeaders();
    if (null !== $this->cid) {
        $headers->setHeaderBody('Id', 'Content-ID', $this->cid);
    }
    if (null !== $this->filename) {
        $headers->setHeaderParameter('Content-Disposition', 'filename', $this->filename);
    }
    return $headers;
}
RSS feed
Powered by Drupal