Stud.IP  5.4
PluginAsset Class Reference
Inheritance diagram for PluginAsset:
Asset

Public Member Functions

 __construct (AssetModel $model)
 
 setOriginalFilename ($filename)
 
 isNew ()
 
 setContent ($content)
 
 getContent ()
 
 getDownloadLink ()
 
 delete ()
 

Detailed Description

Default asset implementation

Will store the asset in Stud.IP's upload folders and the neccessary metadata in the database.

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL2 or any later version
Since
Stud.IP 3.4

Constructor & Destructor Documentation

◆ __construct()

__construct ( AssetModel  $model)
Parameters
AssetModel$modelModel to use

Member Function Documentation

◆ delete()

delete ( )

Deletes this asset

Implements Asset.

◆ getContent()

getContent ( )

Returns the content of the asset.

Returns
String containing the content of the asset

Implements Asset.

◆ getDownloadLink()

getDownloadLink ( )

Returns a download to the asset.

Parameters
Stringcontaining the uri to download the asset

Implements Asset.

◆ isNew()

isNew ( )

Returns whether the asset is new (and needs to be compiled/created). This will return true when the file is either really new or if the source file has changed, when in development mode).

Returns
bool indicating whether the asset if new

Implements Asset.

◆ setContent()

setContent (   $content)

Sets the content of the asset.

Parameters
String$contentContent of the asset

Implements Asset.

◆ setOriginalFilename()

setOriginalFilename (   $filename)

Sets the original file name of the source file.

Parameters
String$filenameName of the original file

Implements Asset.


The documentation for this class was generated from the following file: