ExternalMediaTypes

final readonly class \TYPO3\CMS\IndexedSearch\Service\ExternalMediaTypes

Describes the file types which can be indexed, based on the registered text extractors: the extensions, the item type they are stored as, and the label and icon which are shown in the frontend plugin and the backend module.

Table of Contents

Methods

__construct()  : mixed
getIcon()  : string
getItemType()  : string
The value stored in the "item_type" field of the index, which unifies different file extensions of the same kind of document.
getLabel()  : string
Label of the file extension in the media type selector, an empty string if there is none.
getSupportedExtensions()  : array<int, string>
File extensions for which text extractors exist, without the ones excluded from indexing in the extension configuration.
isMultiPageItemType()  : bool
Whether documents of an item type are indexed in several parts, which are the page ranges of a PDF file.

Methods

getIcon()

public getIcon(string $extension) : string

Parameters

$extension : string

Return values

string

getItemType()

The value stored in the "item_type" field of the index, which unifies different file extensions of the same kind of document.

public getItemType(string $extension) : string

Parameters

$extension : string

Return values

string

getLabel()

Label of the file extension in the media type selector, an empty string if there is none.

public getLabel(string $extension, TranslatorInterface $translator) : string

Parameters

$extension : string
$translator : TranslatorInterface

Return values

string

getSupportedExtensions()

File extensions for which text extractors exist, without the ones excluded from indexing in the extension configuration.

public getSupportedExtensions() : array<int, string>

Return values

array<int, string>

isMultiPageItemType()

Whether documents of an item type are indexed in several parts, which are the page ranges of a PDF file.

public isMultiPageItemType(string $itemType) : bool

Parameters

$itemType : string

Return values

bool
On this page