Force an attachment to be downloaded

author etessore
version 1.0.0
package classes

 Methods

Enables the force to download feature

__construct(bool $priv, bool $nopriv) 

Parameters

$priv

bool

$nopriv

bool

Tests if the $_REQUEST[] field is valid Overload this to insert more checks

check_request() 
Static

AJAX callback for forcing the download of a file

force_download() 
Static

Calculates the url for the attachment with id $id

force_download_anchor(int $id, string $label, array $parms) : string
see \HtmlHelper::anchor()

Parameters

$id

int

the attachment id

$label

string

the text inside the tag

Returns