BeforePreviewFetchedEvent
extends Event
in package
Emitted before a file preview is being fetched.
It can be used to block preview rendering by throwing a OCP\Files\NotFoundException
Tags
Table of Contents
Properties
- $crop : bool|null
- $height : int|null
- $mimeType : string|null
- $mode : string|null
- $node : Node
- $propagationStopped : bool
- $width : int|null
Methods
- __construct() : mixed
- Compatibility constructor
- getHeight() : int|null
- getMimeType() : string|null
- getMode() : null|IPreview::MODE_FILL|IPreview::MODE_COVER
- getNode() : Node
- getWidth() : int|null
- isCrop() : bool|null
- isPropagationStopped() : bool
- {@inheritDoc}
- stopPropagation() : void
- Stops the propagation of the event to further event listeners
Properties
$crop
passing null is deprecated *
private
bool|null
$crop
= null
$height
passing null is deprecated *
private
int|null
$height
= null
$mimeType
private
string|null
$mimeType
= null
$mode
passing null is deprecated *
private
string|null
$mode
= null
$node
private
Node
$node
$propagationStopped
private
bool
$propagationStopped
= false
Tags
$width
passing null is deprecated *
private
int|null
$width
= null
Methods
__construct()
Compatibility constructor
public
__construct(Node $node[, int|null $width = null ][, int|null $height = null ][, bool|null $crop = null ][, string|null $mode = null ][, string|null $mimeType = null ]) : mixed
Parameters
- $node : Node
- $width : int|null = null
- $height : int|null = null
- $crop : bool|null = null
- $mode : string|null = null
- $mimeType : string|null = null
Tags
getHeight()
public
getHeight() : int|null
Tags
Return values
int|nullgetMimeType()
public
getMimeType() : string|null
Tags
Return values
string|nullgetMode()
public
getMode() : null|IPreview::MODE_FILL|IPreview::MODE_COVER
Tags
Return values
null|IPreview::MODE_FILL|IPreview::MODE_COVERgetNode()
public
getNode() : Node
Tags
Return values
NodegetWidth()
public
getWidth() : int|null
Tags
Return values
int|nullisCrop()
public
isCrop() : bool|null
Tags
Return values
bool|nullisPropagationStopped()
{@inheritDoc}
public
isPropagationStopped() : bool
Tags
Return values
boolstopPropagation()
Stops the propagation of the event to further event listeners
public
stopPropagation() : void