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
$linked
public
bool
$linked
= false
$parent
public
MediaObjectInterface|null
$parent
Methods
display()
Switch display mode.
public
display([string $mode = 'source' ]) : MediaLinkInterface|MediaObjectInterface|null
Parameters
- $mode : string = 'source'
Return values
MediaLinkInterface|MediaObjectInterface|nullhtml()
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
stringlightbox()
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
MediaLinkInterfacelink()
Turn the current Medium into a Link
public
link([bool $reset = true ][, array<string|int, mixed> $attributes = [] ]) : MediaLinkInterface
Parameters
- $reset : bool = true
- $attributes : array<string|int, mixed> = []
Return values
MediaLinkInterfaceparsedownElement()
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
stringthumbnail()
Switch thumbnail.
public
thumbnail([string $type = 'auto' ]) : MediaLinkInterface|MediaObjectInterface
Parameters
- $type : string = 'auto'
Return values
MediaLinkInterface|MediaObjectInterfacebubble()
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