trait HasState (View source)

Properties

protected Closure|null $afterStateHydrated
protected Closure|null $afterStateUpdated
protected Closure|null $beforeStateDehydrated
protected $defaultState
protected Closure|null $dehydrateStateUsing
protected Closure|null $mutateDehydratedStateUsing
protected bool $hasDefaultState
protected bool|Closure $isDehydrated
protected string|null $statePath

Methods

afterStateHydrated(Closure|null $callback)

No description

afterStateUpdated(Closure|null $callback)

No description

beforeStateDehydrated(Closure|null $callback)

No description

callAfterStateHydrated()

No description

callAfterStateUpdated()

No description

default($state)

No description

dehydrated(bool|Closure $condition = true)

No description

formatStateUsing(Closure|null $callback)

No description

array
getStateToDehydrate()

No description

void
dehydrateState(array $state)

No description

dehydrateStateUsing(Closure|null $callback)

No description

void
hydrateState(array|null $hydratedDefaultState)

No description

void
fill()

No description

void
hydrateDefaultState(array|null $hydratedDefaultState)

No description

void
fillStateWithNull()

No description

mutateDehydratedState($state)

No description

bool
mutatesDehydratedState()

No description

mutateDehydratedStateUsing(Closure|null $callback)

No description

state($state)

No description

statePath(string|null $path)

No description

getDefaultState()

No description

getState()

No description

getOldState()

No description

string
getStatePath(bool $isAbsolute = true)

No description

bool
hasDefaultState()

No description

bool
isDehydrated()

No description

getGetCallback()

No description

getSetCallback()

No description

string
generateRelativeStatePath(Component $path, bool $isAbsolute = false)

No description

Details

HasState afterStateHydrated(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

HasState

HasState afterStateUpdated(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

HasState

HasState beforeStateDehydrated(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

HasState

HasState callAfterStateHydrated()

No description

Return Value

HasState

HasState callAfterStateUpdated()

No description

Return Value

HasState

HasState callBeforeStateDehydrated()

No description

Return Value

HasState

HasState default($state)

No description

Parameters

$state

Return Value

HasState

HasState dehydrated(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

HasState

HasState formatStateUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

HasState

array getStateToDehydrate()

No description

Return Value

array

void dehydrateState(array $state)

No description

Parameters

array $state

Return Value

void

HasState dehydrateStateUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

HasState

void hydrateState(array|null $hydratedDefaultState)

No description

Parameters

array|null $hydratedDefaultState

Return Value

void

void fill()

No description

Return Value

void

void hydrateDefaultState(array|null $hydratedDefaultState)

No description

Parameters

array|null $hydratedDefaultState

Return Value

void

void fillStateWithNull()

No description

Return Value

void

mutateDehydratedState($state)

No description

Parameters

$state

bool mutatesDehydratedState()

No description

Return Value

bool

HasState mutateDehydratedStateUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

HasState

HasState state($state)

No description

Parameters

$state

Return Value

HasState

HasState statePath(string|null $path)

No description

Parameters

string|null $path

Return Value

HasState

getDefaultState()

No description

getState()

No description

getOldState()

No description

string getStatePath(bool $isAbsolute = true)

No description

Parameters

bool $isAbsolute

Return Value

string

protected bool hasDefaultState()

No description

Return Value

bool

bool isDehydrated()

No description

Return Value

bool

protected Closure getGetCallback()

No description

Return Value

Closure

protected Closure getSetCallback()

No description

Return Value

Closure

protected string generateRelativeStatePath(Component $path, bool $isAbsolute = false)

No description

Parameters

Component $path
bool $isAbsolute

Return Value

string