PackageResource

class \TYPO3\CMS\Core\SystemResource\Type\PackageResource

Implements
SystemResourceInterface, ProcessableFileInterface

Table of Contents

Interfaces

SystemResourceInterface
This interface is public API and can be referenced in third party code or throughout the TYPO3 core.
ProcessableFileInterface
Resources that can be processed with TYPO3's imaging pipeline - a FAL File, a FAL FileReference, or a resource outside the File Abstraction Layer (for example a system resource shipped with a package). FileReference does not implement SystemResourceInterface, so this cannot extend it the way ProcessedResourceInterface does - consumers that need SystemResourceInterface-level members (getImageDimension() and friends) narrow with an instanceof check first, same as for File-specific members.

Properties

$identifier  : PackageResourceIdentifier
$resourceDefinition  : ResourceDefinitionInterface

Methods

__construct()  : mixed
__toString()  : string
getContents()  : string
getExtension()  : string
getHash()  : string
getImageDimension()  : ImageDimension
Returns the dimensions of the referenced image.
getMimeType()  : string
getName()  : string
getNameWithoutExtension()  : string
getResourceIdentifier()  : string
isImage()  : bool
Returns whether the referenced system resource is an image.
process()  : ProcessedFile|ProcessedResource
Returns a processed (resized/cropped/converted) version of this resource. Unlike File::process(), which delegates to the ResourceStorage it already holds a reference to, this resource is constructed directly by SystemResourceFactory, not through a service with a FileProcessingService reference to delegate to - so this reaches it the same way GraphicalFunctions and the processors themselves do.

Properties

Methods

__toString()

public __toString() : string

Return values

string

getExtension()

public getExtension() : string

Return values

string

getName()

public getName() : string

Return values

string

getNameWithoutExtension()

public getNameWithoutExtension() : string

Return values

string

getResourceIdentifier()

public getResourceIdentifier() : string

Return values

string

process()

Returns a processed (resized/cropped/converted) version of this resource. Unlike File::process(), which delegates to the ResourceStorage it already holds a reference to, this resource is constructed directly by SystemResourceFactory, not through a service with a FileProcessingService reference to delegate to - so this reaches it the same way GraphicalFunctions and the processors themselves do.

public process(string $taskType, array $configuration) : ProcessedFile|ProcessedResource

Parameters

$taskType : string

The task type of this processing

$configuration : array

the processing configuration, see manual for that

Return values

ProcessedFile|ProcessedResource
On this page