MetaFox

BgsCollection extends Model
in package
implements Entity Uses HasEntity, HasFactory, HasAmountsTrait, HasNestedAttributes

Class BgsCollection.

Tags
mixin

Builder

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'

Properties

$nestedAttributes

public array<string|int, string>|array<string, mixed> $nestedAttributes = ['backgrounds']

$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 = []

Methods

backgrounds()

public backgrounds() : HasMany
Return values
HasMany

decrementAmount()

public decrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
$column : string
$amount : int = 1
Return values
int

entityId()

public entityId() : int
Return values
int

entityType()

public entityType() : string
Return values
string

factory()

public static factory(mixed $parameters) : BgsCollectionFactory
Parameters
$parameters : mixed
Return values
BgsCollectionFactory

fill()

Fill the model with an array of attributes.

public fill(array<string|int, mixed> $attributes) : static
Parameters
$attributes : array<string|int, mixed>
Tags
throws
MassAssignmentException
Return values
static

getAdminBrowseUrlAttribute()

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
int

mainBackground()

public mainBackground() : BelongsTo
Return values
BelongsTo

moduleName()

public moduleName() : string
Return values
string

save()

Save the model to the database.

public save([array<string|int, mixed> $options = [] ]) : bool
Parameters
$options : array<string|int, mixed> = []
Tags
throws
Exception
Return values
bool

syncHasManyRelationAttribute()

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
bool

syncHasOneRelationAttribute()

public syncHasOneRelationAttribute(HasOne $relation, array<string|int, mixed> $params) : bool
Parameters
$relation : HasOne
$params : array<string|int, mixed>
Return values
bool

allowDestroyNestedAttributes()

Check can we delete nested data.

protected allowDestroyNestedAttributes(array<string|int, mixed> $params) : bool
Parameters
$params : array<string|int, mixed>
Return values
bool

handleNegativeNumber()

protected handleNegativeNumber(string $column) : void
Parameters
$column : string

newFactory()

protected static newFactory() : BgsCollectionFactory
Return values
BgsCollectionFactory

        
On this page

Search results