You are here

public function File::extensionGuesser in Bamboo Twig 8.3

Same name and namespace in other branches
  1. 8.5 bamboo_twig_file/src/TwigExtension/File.php \Drupal\bamboo_twig_file\TwigExtension\File::extensionGuesser()
  2. 8.2 bamboo_twig_file/src/TwigExtension/File.php \Drupal\bamboo_twig_file\TwigExtension\File::extensionGuesser()
  3. 8.4 bamboo_twig_file/src/TwigExtension/File.php \Drupal\bamboo_twig_file\TwigExtension\File::extensionGuesser()

Render a custom date format with Twig.

Use the internal helper "format_date" to render the date using the current language for texts.

File

bamboo_twig_file/src/TwigExtension/File.php, line 43

Class

File
Provides a 'File' Twig Extensions.

Namespace

Drupal\bamboo_twig_file\TwigExtension

Code

public function extensionGuesser($mime_type) {
  return $this
    ->getExtensionGuesser()
    ->guess($mime_type);
}