Attachment
extends Model
in package
implements
Entity, HasThumbnail
Uses
HasEntity, HasFactory, HasItemMorph, HasThumbnailTrait
Class Attachment.
Table of Contents
Interfaces
- Entity
- Interface Entity.
- HasThumbnail
- Interface HasThumbnail.
Constants
- ENTITY_TYPE = 'core_attachment'
- IMPORTER_ENTITY_TYPE = 'attachment'
Properties
- $created_at : string
- $dir_name : string
- $download_url : string
- $extension : string
- $file : StorageFile
- $file_id : string
- $file_name : string
- $file_name_with_extension : string
- $file_size : int
- $fileColumns : array<string|int, mixed>
- $height : int
- $id : int
- $is_image : int
- $item_type : string
- $mime_type : string
- $original_name : string
- $path : string
- $server_id : string
- $updated_at : string
- $user_id : int
- $user_type : string
- $width : int
- $casts : array<string|int, string>
- $fillable : array<string|int, string>
- $table : mixed
Methods
- clone() : self
- entityId() : int
- entityType() : string
- factory() : AttachmentFactory
- getDownloadUrlAttribute() : string|null
- getFileAttribute() : StorageFile|null
- getFileNameWithExtensionAttribute() : string|null
- getImageAttribute() : string|null
- getImagesAttribute() : array<string|int, mixed>|null
- getItemAttribute() : mixed
- getSizes() : array<string|int, mixed>
- getThumbnail() : string|null
- item() : MorphTo|null
- itemId() : int
- itemType() : string
- moduleName() : string
- newFactory() : AttachmentFactory
Constants
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'core_attachment'
IMPORTER_ENTITY_TYPE
public
mixed
IMPORTER_ENTITY_TYPE
= 'attachment'
Properties
$created_at
public
string
$created_at
$dir_name
public
string
$dir_name
$download_url
public
string
$download_url
$extension
public
string
$extension
$file
public
StorageFile
$file
$file_id
public
string
$file_id
$file_name
public
string
$file_name
$file_name_with_extension
public
string
$file_name_with_extension
$file_size
public
int
$file_size
$fileColumns
public
array<string|int, mixed>
$fileColumns
= ['file_id' => 'attachment']
$height
public
int
$height
$id
public
int
$id
$is_image
public
int
$is_image
$item_type
public
string
$item_type
$mime_type
public
string
$mime_type
$original_name
public
string
$original_name
$path
public
string
$path
$server_id
public
string
$server_id
$updated_at
public
string
$updated_at
$user_id
public
int
$user_id
$user_type
public
string
$user_type
$width
public
int
$width
$casts
protected
array<string|int, string>
$casts
= ['is_image' => 'boolean']
$fillable
protected
array<string|int, string>
$fillable
= ['item_type', 'item_id', 'user_id', 'user_type', 'file_id']
$table
protected
mixed
$table
= 'core_attachments'
Methods
clone()
public
clone(User $context, string $itemType, int $itemId) : self
Parameters
- $context : User
- $itemType : string
- $itemId : int
Return values
selfentityId()
public
entityId() : int
Return values
intentityType()
public
entityType() : string
Return values
stringfactory()
public
static factory(mixed $parameters) : AttachmentFactory
Parameters
- $parameters : mixed
Return values
AttachmentFactorygetDownloadUrlAttribute()
public
getDownloadUrlAttribute() : string|null
Return values
string|nullgetFileAttribute()
public
getFileAttribute() : StorageFile|null
Return values
StorageFile|nullgetFileNameWithExtensionAttribute()
public
getFileNameWithExtensionAttribute() : string|null
Return values
string|nullgetImageAttribute()
public
getImageAttribute() : string|null
Return values
string|nullgetImagesAttribute()
public
getImagesAttribute() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetItemAttribute()
public
getItemAttribute() : mixed
getSizes()
public
getSizes() : array<string|int, mixed>
Return values
array<string|int, mixed>getThumbnail()
public
getThumbnail() : string|null
Return values
string|nullitem()
public
item() : MorphTo|null
Return values
MorphTo|nullitemId()
public
itemId() : int
Return values
intitemType()
public
itemType() : string
Return values
stringmoduleName()
public
moduleName() : string
Return values
stringnewFactory()
protected
static newFactory() : AttachmentFactory