BgsCollection
extends Model
in package
implements
Entity
Uses
HasEntity, HasFactory, HasAmountsTrait, HasNestedAttributes
Class BgsCollection.
Tags
Table of Contents
Interfaces
- Entity
- Interface Entity.
Constants
- ENTITY_TYPE = 'pstatusbg_collection'
- IS_ACTIVE = 1
- IS_DEFAULT = 1
- IS_DELETED = 1
- IS_VIEW_ONLY = 1
Properties
- $backgrounds : Collection
- $created_at : string
- $id : int
- $is_active : int
- $is_default : int
- $is_deleted : int
- $main_background_id : int
- $mainBackground : BgsBackground
- $nestedAttributes : array<string|int, string>|array<string, mixed>
- $timestamps : mixed
- $title : string
- $total_background : int
- $view_only : int
- $fillable : array<string|int, string>
- $nestedAttributesFor : array<string|int, mixed>
- Defined nested attributes.
- $table : mixed
Methods
- backgrounds() : HasMany
- decrementAmount() : int
- decrementTotalItem() : void
- entityId() : int
- entityType() : string
- factory() : BgsCollectionFactory
- fill() : static
- Fill the model with an array of attributes.
- getAdminBrowseUrlAttribute() : mixed
- getAdminEditUrlAttribute() : mixed
- getNestedAttributesFor() : array<string|int, mixed>
- Get accept nested attributes.
- incrementAmount() : int
- incrementTotalItem() : void
- incrementTotalView() : void
- mainBackground() : BelongsTo
- moduleName() : string
- save() : bool
- Save the model to the database.
- syncHasManyRelationAttribute() : bool
- Save the hasMany nested relation attributes to the database.
- syncHasOneRelationAttribute() : bool
- allowDestroyNestedAttributes() : bool
- Check can we delete nested data.
- handleNegativeNumber() : void
- newFactory() : BgsCollectionFactory
Constants
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'pstatusbg_collection'
IS_ACTIVE
public
mixed
IS_ACTIVE
= 1
IS_DEFAULT
public
mixed
IS_DEFAULT
= 1
IS_DELETED
public
mixed
IS_DELETED
= 1
IS_VIEW_ONLY
public
mixed
IS_VIEW_ONLY
= 1
Properties
$backgrounds
public
Collection
$backgrounds
$created_at
public
string
$created_at
$id
public
int
$id
$is_active
public
int
$is_active
$is_default
public
int
$is_default
$is_deleted
public
int
$is_deleted
$main_background_id
public
int
$main_background_id
$mainBackground
public
BgsBackground
$mainBackground
$nestedAttributes
public
array<string|int, string>|array<string, mixed>
$nestedAttributes
= ['backgrounds']
$timestamps
public
mixed
$timestamps
= false
$title
public
string
$title
$total_background
public
int
$total_background
$view_only
public
int
$view_only
$fillable
protected
array<string|int, string>
$fillable
= ['title', 'main_background_id', 'is_active', 'is_default', 'is_deleted', 'total_background', 'view_only']
$nestedAttributesFor
Defined nested attributes.
protected
array<string|int, mixed>
$nestedAttributesFor
= []
$table
protected
mixed
$table
= 'bgs_collections'
Methods
backgrounds()
public
backgrounds() : HasMany
Return values
HasManydecrementAmount()
public
decrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
- $column : string
- $amount : int = 1
Return values
intdecrementTotalItem()
public
decrementTotalItem() : void
entityId()
public
entityId() : int
Return values
intentityType()
public
entityType() : string
Return values
stringfactory()
public
static factory(mixed $parameters) : BgsCollectionFactory
Parameters
- $parameters : mixed
Return values
BgsCollectionFactoryfill()
Fill the model with an array of attributes.
public
fill(array<string|int, mixed> $attributes) : static
Parameters
- $attributes : array<string|int, mixed>
Tags
Return values
staticgetAdminBrowseUrlAttribute()
public
getAdminBrowseUrlAttribute() : mixed
getAdminEditUrlAttribute()
public
getAdminEditUrlAttribute() : mixed
getNestedAttributesFor()
Get accept nested attributes.
public
getNestedAttributesFor() : array<string|int, mixed>
Return values
array<string|int, mixed>incrementAmount()
public
incrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
- $column : string
- $amount : int = 1
Return values
intincrementTotalItem()
public
incrementTotalItem() : void
incrementTotalView()
public
incrementTotalView() : void
mainBackground()
public
mainBackground() : BelongsTo
Return values
BelongsTomoduleName()
public
moduleName() : string
Return values
stringsave()
Save the model to the database.
public
save([array<string|int, mixed> $options = [] ]) : bool
Parameters
- $options : array<string|int, mixed> = []
Tags
Return values
boolsyncHasManyRelationAttribute()
Save the hasMany nested relation attributes to the database.
public
syncHasManyRelationAttribute(HasMany $relation, array<string|int, mixed> $params) : bool
Parameters
- $relation : HasMany
- $params : array<string|int, mixed>
Return values
boolsyncHasOneRelationAttribute()
public
syncHasOneRelationAttribute(HasOne $relation, array<string|int, mixed> $params) : bool
Parameters
- $relation : HasOne
- $params : array<string|int, mixed>
Return values
boolallowDestroyNestedAttributes()
Check can we delete nested data.
protected
allowDestroyNestedAttributes(array<string|int, mixed> $params) : bool
Parameters
- $params : array<string|int, mixed>
Return values
boolhandleNegativeNumber()
protected
handleNegativeNumber(string $column) : void
Parameters
- $column : string
newFactory()
protected
static newFactory() : BgsCollectionFactory