abstract class FormatUploads (View source)

Upload parsing utilities.

Constants

PROTOCOL

Methods

static void
configure(Configurator $config)

Formatter configuration callback.

static void
rendering(Renderer $renderer, string $xml, Context|null $context)

Formatter rendering callback.

static array
getAttachedUploads(string $xml)

Get all the upload filenames that have been used in a piece of content.

Details

static void configure(Configurator $config)

Formatter configuration callback.

Parameters

Configurator $config

Return Value

void

static void rendering(Renderer $renderer, string $xml, Context|null $context)

Formatter rendering callback.

Parameters

Renderer $renderer
string $xml
Context|null $context

Return Value

void

static array getAttachedUploads(string $xml)

Get all the upload filenames that have been used in a piece of content.

This is used in the HasBody model trait to populate the uploads relationship so that it can be eager loaded when the content is displayed, and the rendering function above can make use of the data.

Parameters

string $xml

Return Value

array