Documentation

ThumbnailMediaTrait

Trait ThumbnailMediaTrait

Table of Contents

Properties

$linked  : bool
$parent  : MediaObjectInterface|null

Methods

display()  : MediaLinkInterface|MediaObjectInterface|null
Switch display mode.
html()  : string
Return HTML markup from the medium.
lightbox()  : MediaLinkInterface
Turn the current Medium into a Link with lightbox enabled
link()  : MediaLinkInterface
Turn the current Medium into a Link
parsedownElement()  : array<string|int, mixed>
Get an element (is array) that can be rendered by the Parsedown engine
srcset()  : string
Return srcset string for this Medium and its alternatives.
thumbnail()  : MediaLinkInterface|MediaObjectInterface
Switch thumbnail.
bubble()  : mixed
Bubble a function call up to either the superclass function or the parent Medium instance

Properties

Methods

html()

Return HTML markup from the medium.

public html([string|null $title = null ][, string|null $alt = null ][, string|null $class = null ][, string|null $id = null ][, bool $reset = true ]) : string
Parameters
$title : string|null = null
$alt : string|null = null
$class : string|null = null
$id : string|null = null
$reset : bool = true
Return values
string

lightbox()

Turn the current Medium into a Link with lightbox enabled

public lightbox([int|null $width = null ][, int|null $height = null ][, bool $reset = true ]) : MediaLinkInterface
Parameters
$width : int|null = null
$height : int|null = null
$reset : bool = true
Return values
MediaLinkInterface

parsedownElement()

Get an element (is array) that can be rendered by the Parsedown engine

public parsedownElement([string|null $title = null ][, string|null $alt = null ][, string|null $class = null ][, string|null $id = null ][, bool $reset = true ]) : array<string|int, mixed>
Parameters
$title : string|null = null
$alt : string|null = null
$class : string|null = null
$id : string|null = null
$reset : bool = true
Return values
array<string|int, mixed>

srcset()

Return srcset string for this Medium and its alternatives.

public srcset([bool $reset = true ]) : string
Parameters
$reset : bool = true
Return values
string

bubble()

Bubble a function call up to either the superclass function or the parent Medium instance

protected bubble(string $method[, array<string|int, mixed> $arguments = [] ][, bool $testLinked = true ]) : mixed
Parameters
$method : string
$arguments : array<string|int, mixed> = []
$testLinked : bool = true

        
On this page

Search results