FileModel Class Reference

Inheritance diagram for FileModel:
Item CustomFieldsModel RedBeanModel BeanModel ObservableComponent ExportFileModel ImageFileModel

Static Public Member Functions

static getDefaultMetadata ()
static isTypeDeletable ()

Protected Member Functions

 beforeSave ()
 deleteRelatedFileContentIfNotRelatedToAnyOtherFileModel ()
 deleteOwnedRelatedModels ($modelClassName)

Static Protected Member Functions

static translatedAttributeLabels ($language)

Detailed Description

Definition at line 37 of file FileModel.php.


Member Function Documentation

static getDefaultMetadata (  )  [static]

Returns the default meta data for the class. It must be appended to the meta data from the parent model, if any.

Reimplemented from Item.

Definition at line 39 of file FileModel.php.

static isTypeDeletable (  )  [static]

To be overriden on intermediate derived classes to return false so that deletes are not done on intermediate classes because the object relational mapping will not clean up properly. For example if User is a Person, and Person is a RedBeanModel delete should be called only on User, not on Person. So User must override isDeletable to return false.

Reimplemented from Item.

Definition at line 71 of file FileModel.php.

beforeSave (  )  [protected]

Special handling of the import scenario. When you are importing a model, you can potentially set the created/modified user/datetime which is normally not allowed since they are read-only attributes. This logic helps to allow for this special use case.

See also:
RedBeanModel::beforeSave()

Reimplemented from Item.

Definition at line 87 of file FileModel.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Aug 19 07:10:25 2017