\CleanFile
A wrapper for File, which adds a Title field and a relation to it's page.
- Author: arillo
Synopsis
class CleanFile
extends DataObject
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $searchable_fields = ;
- private static array $summary_fields = ;
- public static array $allowed_extensions = ;
- public static string $upload_folder = "files";
- // methods
- public FieldList getCMSFields()
- public string DownloadLink()
- public string AbsoluteDownloadLink()
Hierarchy
Extends
- DataObject
Members
private
- $db
- $has_one
- $searchable_fields
- $summary_fields
public
- $allowed_extensions
—
array
Allowed file extensions for uploading. - $upload_folder
—
string
This var specifies the name of the upload folder
Methods
public
- AbsoluteDownloadLink() — Returns a absolute download link like: http://domain.com/URLSegment/download/ClassName/ID
- DownloadLink() — Returns a download link like: URLSegment/download/ClassName/ID
- getCMSFields() — CMS fields, can be extended by write your own updateCMSFields function.