class MimeTypeMapFactory
Factory for creating the MIME type map.
Hierarchy
- class \Drupal\Core\File\MimeType\MimeTypeMapFactory
Expanded class hierarchy of MimeTypeMapFactory
File
-
core/
lib/ Drupal/ Core/ File/ MimeType/ MimeTypeMapFactory.php, line 13
Namespace
Drupal\Core\File\MimeTypeView source
class MimeTypeMapFactory {
public function __construct(protected readonly EventDispatcherInterface $eventDispatcher) {
}
/**
* Creates an instance of the MIME type map.
*
* @return \Drupal\Core\File\MimeType\MimeTypeMapInterface
* The MIME type map.
*/
public function create() : MimeTypeMapInterface {
$map = $this->doCreateMap();
$this->eventDispatcher
->dispatch(new MimeTypeMapLoadedEvent($map));
return $map;
}
protected function doCreateMap() : MimeTypeMapInterface {
return new MimeTypeMap();
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
MimeTypeMapFactory::create | public | function | Creates an instance of the MIME type map. |
MimeTypeMapFactory::doCreateMap | protected | function | |
MimeTypeMapFactory::__construct | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.