Type
extends Model
in package
implements
Entity, IsBitwiseFlagInterface
Uses
HasEntity, BitwiseFlag, HasFactory
Class Type.
Tags
Table of Contents
Interfaces
- Entity
- Interface Entity.
- IsBitwiseFlagInterface
Constants
- CAN_SEARCH_FEED = 1
- CAN_SEARCH_FEED_TYPE = 'can_search_feed_type'
- ENTITY_TYPE = 'search_type'
Properties
- $can_search_feed : bool
- $description : string
- $entity_type : string
- $id : int
- $is_active : bool
- $is_system : bool
- $module_id : string
- $params : array<string|int, mixed>
- $system_value : int
- $timestamps : bool
- $title : string
- $type : string
- $appends : array<string|int, string>
- $casts : array<string, string>
- $fillable : array<string|int, string>
- $table : mixed
Methods
- entityId() : int
- entityType() : string
- factory() : SearchFactory
- getAbilities() : array<string, int>
- Define bitwise abilities. Example: [ 'can_comment' => 1, 'can_like' => 2].
- getCanSearchFeedAttribute() : bool
- getFlag() : bool
- getFlagName() : string
- Define database column to storage bitwise value.
- moduleName() : string
- setCanSearchFeedAttribute() : self
- setFlag() : $this
- newFactory() : TypeFactory
Constants
CAN_SEARCH_FEED
public
mixed
CAN_SEARCH_FEED
= 1
CAN_SEARCH_FEED_TYPE
public
mixed
CAN_SEARCH_FEED_TYPE
= 'can_search_feed_type'
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'search_type'
Properties
$can_search_feed
public
bool
$can_search_feed
$description
public
string
$description
$entity_type
public
string
$entity_type
$id
public
int
$id
$is_active
public
bool
$is_active
$is_system
public
bool
$is_system
$module_id
public
string
$module_id
$params
public
array<string|int, mixed>
$params
$system_value
public
int
$system_value
$timestamps
public
bool
$timestamps
= false
$title
public
string
$title
$type
public
string
$type
$appends
protected
array<string|int, string>
$appends
= ['can_search_feed']
$casts
protected
array<string, string>
$casts
= ['params' => 'array']
$fillable
protected
array<string|int, string>
$fillable
= ['type', 'module_id', 'entity_type', 'title', 'description', 'is_active', 'is_system', 'params']
$table
protected
mixed
$table
= 'search_types'
Methods
entityId()
public
entityId() : int
Return values
intentityType()
public
entityType() : string
Return values
stringfactory()
public
factory(mixed $parameters) : SearchFactory
Parameters
- $parameters : mixed
Return values
SearchFactorygetAbilities()
Define bitwise abilities. Example: [ 'can_comment' => 1, 'can_like' => 2].
public
getAbilities() : array<string, int>
Return values
array<string, int>getCanSearchFeedAttribute()
public
getCanSearchFeedAttribute() : bool
Return values
boolgetFlag()
public
getFlag(int $flag) : bool
Parameters
- $flag : int
Tags
Return values
boolgetFlagName()
Define database column to storage bitwise value.
public
getFlagName() : string
Return values
stringmoduleName()
public
moduleName() : string
Return values
stringsetCanSearchFeedAttribute()
public
setCanSearchFeedAttribute([bool $ability = true ]) : self
Parameters
- $ability : bool = true
Return values
selfsetFlag()
public
setFlag(int $flag, bool $value) : $this
Parameters
- $flag : int
- $value : bool
Return values
$thisnewFactory()
protected
static newFactory() : TypeFactory