class UploadEmailLogoController extends UploadImageController

Uploads the logo shown at the top of HTML emails. It's stored as PNG (or GIF when animated) rather than WebP, which many mail clients can't display.

Properties

protected Filesystem $uploadDir from UploadImageController
protected string $fileExtension from UploadImageController
protected string $filePathSettingKey
protected string $filenamePrefix
protected string|null $validator

Methods

__construct( JsonApi $api, SettingsRepositoryInterface $settings, ImageManager $imageManager, TranslatorInterface $translator, Factory $filesystemFactory, Container $container)

No description

ResponseInterface
handle( ServerRequestInterface $request)

No description

EncodedImageInterface| StreamInterface
makeImage( UploadedFileInterface $file)

No description

void
afterStore( ServerRequestInterface $request, UploadedFileInterface $file)

Runs after the image has been stored and its setting saved, before the forum document is returned. Override it to store derived images.

string
fileExtension( ServerRequestInterface $request, UploadedFileInterface $file)

No description

string
filePathSettingKey( ServerRequestInterface $request, UploadedFileInterface $file)

No description

string
filenamePrefix( ServerRequestInterface $request)

No description

Details

__construct( JsonApi $api, SettingsRepositoryInterface $settings, ImageManager $imageManager, TranslatorInterface $translator, Factory $filesystemFactory, Container $container)

Parameters

JsonApi $api
SettingsRepositoryInterface $settings
ImageManager $imageManager
TranslatorInterface $translator
Factory $filesystemFactory
Container $container

ResponseInterface handle( ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

ResponseInterface

protected EncodedImageInterface| StreamInterface makeImage( UploadedFileInterface $file)

Parameters

UploadedFileInterface $file

Return Value

EncodedImageInterface| StreamInterface

protected void afterStore( ServerRequestInterface $request, UploadedFileInterface $file)

Runs after the image has been stored and its setting saved, before the forum document is returned. Override it to store derived images.

Parameters

ServerRequestInterface $request
UploadedFileInterface $file

Return Value

void

protected string fileExtension( ServerRequestInterface $request, UploadedFileInterface $file)

Parameters

ServerRequestInterface $request
UploadedFileInterface $file

Return Value

string

protected string filePathSettingKey( ServerRequestInterface $request, UploadedFileInterface $file)

Parameters

ServerRequestInterface $request
UploadedFileInterface $file

Return Value

string

protected string filenamePrefix( ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

string