You are here

public static function FileMiconFormatter::mimeGroups in Micon 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Field/FieldFormatter/FileMiconFormatter.php \Drupal\micon\Plugin\Field\FieldFormatter\FileMiconFormatter::mimeGroups()

Get mime groups.

2 calls to FileMiconFormatter::mimeGroups()
FileMiconFormatter::defaultSettings in src/Plugin/Field/FieldFormatter/FileMiconFormatter.php
Defines the default settings for this plugin.
FileMiconFormatter::settingsForm in src/Plugin/Field/FieldFormatter/FileMiconFormatter.php
Returns a form to configure settings for the formatter.

File

src/Plugin/Field/FieldFormatter/FileMiconFormatter.php, line 150

Class

FileMiconFormatter
Plugin implementation of the 'file_micon' formatter.

Namespace

Drupal\micon\Plugin\Field\FieldFormatter

Code

public static function mimeGroups() {
  return [
    'default' => [
      'label' => t('Default'),
      'icon' => 'fa-file',
    ],
    'image' => [
      'label' => t('Image'),
      'icon' => 'fa-file-image',
    ],
    'document' => [
      'label' => t('Document'),
      'icon' => 'fa-file-word',
    ],
    'spreadsheet' => [
      'label' => t('Spreadsheet'),
      'icon' => 'fa-file-excel',
    ],
    'presentation' => [
      'label' => t('Presentation'),
      'icon' => 'fa-file-powerpoint',
    ],
    'archive' => [
      'label' => t('Archive'),
      'icon' => 'fa-file-archive',
    ],
    'script' => [
      'label' => t('Script'),
      'icon' => 'fa-file-code',
    ],
    'html' => [
      'label' => t('HTML'),
      'icon' => 'fa-file-code',
    ],
    'executable' => [
      'label' => t('Executable'),
      'icon' => 'fa-file-exclamation',
    ],
    'pdf' => [
      'label' => t('PDF'),
      'icon' => 'fa-file-pdf',
    ],
  ];
}