function MimeTypeMapInterface::addMapping

Same name and namespace in other branches
  1. main core/lib/Drupal/Core/File/MimeType/MimeTypeMapInterface.php \Drupal\Core\File\MimeType\MimeTypeMapInterface::addMapping()

Adds a mapping between a MIME type and an extension.

Parameters

string $mimetype: The MIME type the passed extension should map.

string $extension: The extension(s) that should map to the passed MIME type.

Return value

$this

File

core/lib/Drupal/Core/File/MimeType/MimeTypeMapInterface.php, line 22

Class

MimeTypeMapInterface
Provides an interface for MIME type to file extension mapping.

Namespace

Drupal\Core\File\MimeType

Code

public function addMapping(string $mimetype, string $extension) : self;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.