Arikaim CMS

Events extends Model
in package
implements EventRegistryInterface Uses Uuid, Status, Find

Events database model

Table of Contents

Interfaces

EventRegistryInterface
Event Registry Interface

Properties

$ACTIVE  : mixed
Active
$CANCELLED  : mixed
Cancelled
$COMPLETED  : mixed
Completed
$DISABLED  : mixed
Disabled
$PENDING  : mixed
Pending activation
$PUBLISHED  : mixed
Published
$SUSPENDED  : mixed
Suspended
$timestamps  : bool
Timestamps disabled
$DEFAULT_STATUS_COLUMN  : string
Default status column name
$DEFAULT_UUID_COLUMN  : string
Default uuid column name
$fillable  : array<string|int, mixed>
Fillable attributes
$statusText  : array<string|int, mixed>
Status text
$table  : string
Db table name

Methods

ACTIVE()  : int
Return active value
bootUuid()  : void
Init model events.
CANCELLED()  : int
Cancelled
COMPLETED()  : int
Return completed value
deleteEvent()  : bool
Deleet event
deleteEvents()  : bool
Delete events.
DISABLED()  : int
Return disabled value
findByColumn()  : Model|null
Find model by column name
findById()  : Model|null
Find model by id or uuid
findByIdQuery()  : Builder
Return query builder
findItems()  : QueryBuilder|false
Find collection of models by id or uuid
findMultiple()  : Builder
Find multiole query
findQuery()  : Builder
Return query builder
getActive()  : Builder
Return active model query builder
getDisabled()  : Builder
Return disabled model query builder
getEvents()  : array<string|int, mixed>
Get events list
getIdAttributeName()  : string
Return id column name dependiv of id value type for string return uuid
getLastId()  : int|null
Get last id
getLastRow()  : Model|null
Get last row
getPropertiesAttribute()  : array<string|int, mixed>
Mutator (get) for properties attribute.
hasAttribute()  : bool
Return true if atr exist
hasEvent()  : bool
Return true if event exist
PENDING()  : int
Pending activation
registerEvent()  : bool
Add or update event to events db table.
resolveStatusText()  : int|false
Resolve status id
resolveStatusValue()  : int
Get status value
saveProperties()  : bool
Save properties
savePropertiesDescriptor()  : bool
Save event properties description
scopeActiveQuery()  : Builder
Active status scope
scopeSearchIgnoreCase()  : Builder
Case insensitive search
scopeStatusQuery()  : Builder
Status scope
setEventsStatus()  : bool
Set events status
setStatus()  : bool
Set model status
subscribers()  : object
Get event subscribers
SUSPENDED()  : int
Suspended
whereIgnoreCase()  : Builder
Where case insensitive

Properties

$ACTIVE

Active

public static mixed $ACTIVE = 1

$CANCELLED

Cancelled

public static mixed $CANCELLED = 6

$COMPLETED

Completed

public static mixed $COMPLETED = 2

$DISABLED

Disabled

public static mixed $DISABLED = 0

$PENDING

Pending activation

public static mixed $PENDING = 4

$PUBLISHED

Published

public static mixed $PUBLISHED = 3

$SUSPENDED

Suspended

public static mixed $SUSPENDED = 5

$timestamps

Timestamps disabled

public bool $timestamps = false

$DEFAULT_STATUS_COLUMN

Default status column name

protected static string $DEFAULT_STATUS_COLUMN = 'status'

$DEFAULT_UUID_COLUMN

Default uuid column name

protected static string $DEFAULT_UUID_COLUMN = 'uuid'

$fillable

Fillable attributes

protected array<string|int, mixed> $fillable = ['uuid', 'name', 'title', 'status', 'extension_name', 'properties', 'description']

$statusText

Status text

protected array<string|int, mixed> $statusText = ['disabled', 'active', 'completed', 'published', 'pending', 'suspended', 'cancelled']

$table

Db table name

protected string $table = 'events'

Methods

ACTIVE()

Return active value

public ACTIVE() : int
Return values
int

bootUuid()

Init model events.

public static bootUuid() : void

CANCELLED()

Cancelled

public CANCELLED() : int
Return values
int

COMPLETED()

Return completed value

public COMPLETED() : int
Return values
int

deleteEvent()

Deleet event

public deleteEvent(string $name) : bool
Parameters
$name : string
Return values
bool

deleteEvents()

Delete events.

public deleteEvents(array<string|int, mixed> $filter) : bool
Parameters
$filter : array<string|int, mixed>
Return values
bool

DISABLED()

Return disabled value

public DISABLED() : int
Return values
int

findByColumn()

Find model by column name

public findByColumn(mixed $value[, string|null|array<string|int, mixed> $column = null ]) : Model|null
Parameters
$value : mixed
$column : string|null|array<string|int, mixed> = null
Return values
Model|null

findById()

Find model by id or uuid

public findById(int|string $id) : Model|null
Parameters
$id : int|string
Return values
Model|null

findByIdQuery()

Return query builder

public findByIdQuery(int|string $id) : Builder
Parameters
$id : int|string
Return values
Builder

findItems()

Find collection of models by id or uuid

public findItems(array<string|int, mixed>|null $items) : QueryBuilder|false
Parameters
$items : array<string|int, mixed>|null
Return values
QueryBuilder|false

findMultiple()

Find multiole query

public findMultiple(array<string|int, mixed> $idList) : Builder
Parameters
$idList : array<string|int, mixed>
Return values
Builder

findQuery()

Return query builder

public findQuery(mixed $value[, string|null|array<string|int, mixed> $column = null ]) : Builder
Parameters
$value : mixed
$column : string|null|array<string|int, mixed> = null
Return values
Builder

getActive()

Return active model query builder

public getActive() : Builder
Return values
Builder

getDisabled()

Return disabled model query builder

public getDisabled() : Builder
Return values
Builder

getEvents()

Get events list

public getEvents([array<string|int, mixed> $filter = [] ]) : array<string|int, mixed>
Parameters
$filter : array<string|int, mixed> = []
Return values
array<string|int, mixed>

getIdAttributeName()

Return id column name dependiv of id value type for string return uuid

public getIdAttributeName(int|string $id) : string
Parameters
$id : int|string
Return values
string

getLastId()

Get last id

public getLastId() : int|null
Return values
int|null

getLastRow()

Get last row

public getLastRow([string $field = 'id' ]) : Model|null
Parameters
$field : string = 'id'
Return values
Model|null

getPropertiesAttribute()

Mutator (get) for properties attribute.

public getPropertiesAttribute() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasAttribute()

Return true if atr exist

public hasAttribute(string $attr) : bool
Parameters
$attr : string
Return values
bool

hasEvent()

Return true if event exist

public hasEvent(string $name) : bool
Parameters
$name : string
Return values
bool

PENDING()

Pending activation

public PENDING() : int
Return values
int

registerEvent()

Add or update event to events db table.

public registerEvent(string $name, string $title[, string|null $extension = null ][, string|null $description = null ]) : bool
Parameters
$name : string
$title : string
$extension : string|null = null
$description : string|null = null
Return values
bool

resolveStatusText()

Resolve status id

public resolveStatusText(string|int $status) : int|false
Parameters
$status : string|int
Return values
int|false

resolveStatusValue()

Get status value

public resolveStatusValue([int|null|string $status = null ]) : int
Parameters
$status : int|null|string = null
Return values
int

saveProperties()

Save properties

public saveProperties(array<string|int, mixed> $properties) : bool
Parameters
$properties : array<string|int, mixed>
Return values
bool

savePropertiesDescriptor()

Save event properties description

public savePropertiesDescriptor(string $name, object|array<string|int, mixed> $descriptor) : bool
Parameters
$name : string
$descriptor : object|array<string|int, mixed>
Return values
bool

scopeActiveQuery()

Active status scope

public scopeActiveQuery(Builder $query) : Builder
Parameters
$query : Builder
Return values
Builder

scopeSearchIgnoreCase()

Case insensitive search

public scopeSearchIgnoreCase(Builder $query, string $column, string|null $value) : Builder
Parameters
$query : Builder
$column : string
$value : string|null
Return values
Builder

scopeStatusQuery()

Status scope

public scopeStatusQuery(Builder $query, mixed $items) : Builder
Parameters
$query : Builder
$items : mixed
Return values
Builder

setEventsStatus()

Set events status

public setEventsStatus(array<string|int, mixed> $filter, int $status) : bool
Parameters
$filter : array<string|int, mixed>
$status : int
Return values
bool

setStatus()

Set model status

public setStatus([int|string|null $status = null ]) : bool
Parameters
$status : int|string|null = null
Return values
bool

subscribers()

Get event subscribers

public subscribers([string|null $name = null ]) : object
Parameters
$name : string|null = null
Return values
object

SUSPENDED()

Suspended

public SUSPENDED() : int
Return values
int

whereIgnoreCase()

Where case insensitive

public whereIgnoreCase(string $attribute, mixed $value[, string $operator = '=' ]) : Builder
Parameters
$attribute : string
$value : mixed
$operator : string = '='
Return values
Builder

        
On this page

Search results