FileModel Class Reference

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

Public Member Functions

 __toString ()
 fileTypeValidator ($attribute, $params)

Static Public Member Functions

static getDefaultMetadata ()
static isTypeDeletable ()

Protected Member Functions

 beforeSave ()
 deleteRelatedFileContentIfNotRelatedToAnyOtherFileModel ()
 deleteOwnedRelatedModels ($modelClassName)

Static Protected Member Functions

static translatedAttributeLabels ($language)

Protected Attributes

 $isAudited = false

Detailed Description

Definition at line 37 of file FileModel.php.


Member Function Documentation

__toString (  ) 

Returns the displayable string for the class. Should be overridden in any model that can provide a meaningful string representation of itself.

Returns:
A string.

Reimplemented from RedBeanModel.

Definition at line 41 of file FileModel.php.

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.

Reimplemented in ImageFileModel.

Definition at line 50 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 88 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 104 of file FileModel.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Tue Jul 16 07:11:02 2019