class UploadLogoController extends UploadImageController

Properties

protected Filesystem $uploadDir from UploadImageController
protected string $fileExtension from UploadImageController
protected string $filePathSettingKey
protected string $filenamePrefix
protected string|null $validator
protected bool $makeEmailCopy Whether to also store an email-safe copy of the logo, which emails fall back to when no email logo has been uploaded.

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