SilverWare\Publications\Model\PublicationFile
An extension of the data object class for a publication file.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2018 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class PublicationFile
extends DataObject
{
- // members
- private static string $singular_name = 'Publication File';
- private static string $plural_name = 'Publication Files';
- private static string $table_name = 'SilverWare_PublicationFile';
- private static string $default_sort = 'Sort';
- private static array $db = ;
- private static array $has_one = ;
- private static array $defaults = ;
- private static array $summary_fields = ;
- private static string $asset_folder = 'Publications/Files';
- // methods
- public FieldList getCMSFields()
- public RequiredFields getCMSValidator()
- public array fieldLabels()
- public void onBeforeWrite()
- public string getAssetFolder()
- public string getURL()
- public string getType()
- public string getSize()
- public boolean getShowInfo()
- public string getInfo()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $asset_folder
—
string
Defines the asset folder for uploading images. - $db
—
array
Maps field names to field types for this object. - $default_sort
—
string
Defines the default sort field and order for this object. - $defaults
—
array
Defines the default values for the fields of this object. - $has_one
—
array
Defines the has-one associations for this object. - $plural_name
—
string
Human-readable plural name. - $singular_name
—
string
Human-readable singular name. - $summary_fields
—
array
Defines the summary fields of this object. - $table_name
—
string
Defines the table name to use for this object.
Methods
public
- fieldLabels() — Answers the labels for the fields of the receiver.
- getAssetFolder() — Answers the asset folder used by the receiver.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getCMSValidator() — Answers a validator for the CMS interface.
- getInfo() — Answers a string of information about the file.
- getShowInfo() — Answers true if the file information is to be shown in the template.
- getSize() — Answers the size of the file.
- getType() — Answers the type of the file.
- getURL() — Answers the URL for downloading the file.
- onBeforeWrite() — Event method called before the receiver is written to the database.