Documentation

MediaFileTrait

Trait MediaFileTrait

Table of Contents

Methods

exists()  : bool
Check if this medium exists or not
modified()  : int|null
Get file modification time for the medium.
path()  : string
Return PATH to file.
relativePath()  : string
Return the relative path to file
reset()  : $this
Reset medium.
size()  : int
Get size of the medium.
url()  : string
Return URL to file.
urlQuerystring()  : string
Get the URL with full querystring
getGrav()  : Grav

Methods

exists()

Check if this medium exists or not

public exists() : bool
Return values
bool

modified()

Get file modification time for the medium.

public modified() : int|null
Return values
int|null

path()

Return PATH to file.

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

path to file

relativePath()

Return the relative path to file

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

reset()

Reset medium.

public abstract reset() : $this
Return values
$this

size()

Get size of the medium.

public size() : int
Return values
int

url()

Return URL to file.

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

urlQuerystring()

Get the URL with full querystring

public abstract urlQuerystring(string $url) : string
Parameters
$url : string
Return values
string

        
On this page

Search results