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

Breadcrumb

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

function TextPart::getPreparedHeaders

Overrides AbstractPart::getPreparedHeaders

2 calls to TextPart::getPreparedHeaders()
DataPart::getPreparedHeaders in vendor/symfony/mime/Part/DataPart.php
DataPart::getPreparedHeaders in vendor/symfony/mime/Part/DataPart.php
1 method overrides TextPart::getPreparedHeaders()
DataPart::getPreparedHeaders in vendor/symfony/mime/Part/DataPart.php

File

vendor/symfony/mime/Part/TextPart.php, line 170

Class

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

Namespace

Symfony\Component\Mime\Part

Code

public function getPreparedHeaders() : Headers {
    $headers = parent::getPreparedHeaders();
    $headers->setHeaderBody('Parameterized', 'Content-Type', $this->getMediaType() . '/' . $this->getMediaSubtype());
    if ($this->charset) {
        $headers->setHeaderParameter('Content-Type', 'charset', $this->charset);
    }
    if ($this->name && 'form-data' !== $this->disposition) {
        $headers->setHeaderParameter('Content-Type', 'name', $this->name);
    }
    $headers->setHeaderBody('Text', 'Content-Transfer-Encoding', $this->encoding);
    if (!$headers->has('Content-Disposition') && null !== $this->disposition) {
        $headers->setHeaderBody('Parameterized', 'Content-Disposition', $this->disposition);
        if ($this->name) {
            $headers->setHeaderParameter('Content-Disposition', 'name', $this->name);
        }
    }
    return $headers;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal