Skip to content
docsv0.31.1

BrandMarkHtmlRenderer

Draws the house's mark as inline SVG. Inline rather than an `<img>` because the grains have to be individually addressable: the state is a wave travelling thirteen elements, and an image is one element. It is also why the mark cannot simply be the wordmark file — that one identifies, this one reports. The renderer writes NO styling of its own. Everything the mark looks like arrives through the stylesheet the component declares, which is the whole claim under test: if a consumer had to add rules to make this look right, the component would not be travelling whole.

BrandMarkHtmlRenderer::supportsTarget()

public function supportsTarget(Milpa\Live\ValueObjects\RenderTarget $target): bool

HTML only: the mark is thirteen SVG elements, and a TUI has nowhere to put them.

Parameters

Parameters of supportsTarget()
NameTypeDescription
$targetMilpa\Live\ValueObjects\RenderTarget

BrandMarkHtmlRenderer::render()

public function render(Milpa\Live\Contracts\Component\ComponentDefinitionInterface $component, Milpa\Live\ValueObjects\RenderRequest $request): Milpa\Live\ValueObjects\RenderResult

Renders the mark in the state it was mounted with, addressable by `data-state`.

Parameters

Parameters of render()
NameTypeDescription
$componentMilpa\Live\Contracts\Component\ComponentDefinitionInterface
$requestMilpa\Live\ValueObjects\RenderRequest