trait HasState (View source)

Properties

protected Closure|null $afterStateHydrated
protected Closure[] $afterStateUpdated
protected Closure|null $beforeStateDehydrated
protected mixed $defaultState
protected Closure|null $dehydrateStateUsing
protected Closure|null $mutateDehydratedStateUsing
protected Closure|null $mutateStateForValidationUsing
protected bool $hasDefaultState
protected bool|Closure $isDehydrated
protected bool|Closure $isDehydratedWhenHidden
protected string|null $statePath
protected string $cachedAbsoluteStatePath
protected string $stripCharacters
protected string[] $cachedStripCharacters

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

void
callAfterStateUpdatedHook(Closure $hook)

No description

default(mixed $state)

No description

dehydrated(bool|Closure $condition = true)

No description

dehydratedWhenHidden(bool|Closure $condition = true)

No description

formatStateUsing(Closure|null $callback)

No description

array
getStateToDehydrate()

No description

void
dehydrateState(array $state, bool $isDehydrated = true)

No description

dehydrateStateUsing(Closure|null $callback)

No description

void
hydrateState(array|null $hydratedDefaultState, bool $andCallHydrationHooks = true)

No description

void
fill()

No description

void
hydrateDefaultState(array|null $hydratedDefaultState)

No description

void
fillStateWithNull()

No description

mixed
mutateDehydratedState(mixed $state)

No description

mixed
mutateStateForValidation(mixed $state)

No description

mixed
stripCharactersFromState(mixed $state)

No description

bool
mutatesDehydratedState()

No description

bool
mutatesStateForValidation()

No description

bool
hasStripCharacters()

No description

mutateDehydratedStateUsing(Closure|null $callback)

No description

mutateStateForValidationUsing(Closure|null $callback)

No description

state(mixed $state)

No description

statePath(string|null $path)

No description

mixed
getDefaultState()

No description

mixed
getState()

No description

mixed
getOldState()

No description

string
getStatePath(bool $isAbsolute = true)

No description

bool
hasStatePath()

No description

bool
hasDefaultState()

No description

bool
isDehydrated()

No description

bool
isDehydratedWhenHidden()

No description

bool
isHiddenAndNotDehydrated()

No description

Get
getGetCallback()

No description

Set
getSetCallback()

No description

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

No description

void
flushCachedAbsoluteStatePath()

No description

stripCharacters(string|array|Closure|null $characters)

No description

array
getStripCharacters()

No description

Details

HasState afterStateHydrated(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

HasState

HasState clearAfterStateUpdatedHooks()

No description

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

protected void callAfterStateUpdatedHook(Closure $hook)

No description

Parameters

Closure $hook

Return Value

void

HasState callBeforeStateDehydrated()

No description

Return Value

HasState

HasState default(mixed $state)

No description

Parameters

mixed $state

Return Value

HasState

HasState dehydrated(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

HasState

HasState dehydratedWhenHidden(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, bool $isDehydrated = true)

No description

Parameters

array $state
bool $isDehydrated

Return Value

void

HasState dehydrateStateUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

HasState

void hydrateState(array|null $hydratedDefaultState, bool $andCallHydrationHooks = true)

No description

Parameters

array|null $hydratedDefaultState
bool $andCallHydrationHooks

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

mixed mutateDehydratedState(mixed $state)

No description

Parameters

mixed $state

Return Value

mixed

mixed mutateStateForValidation(mixed $state)

No description

Parameters

mixed $state

Return Value

mixed

protected mixed stripCharactersFromState(mixed $state)

No description

Parameters

mixed $state

Return Value

mixed

bool mutatesDehydratedState()

No description

Return Value

bool

bool mutatesStateForValidation()

No description

Return Value

bool

bool hasStripCharacters()

No description

Return Value

bool

HasState mutateDehydratedStateUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

HasState

HasState mutateStateForValidationUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

HasState

HasState state(mixed $state)

No description

Parameters

mixed $state

Return Value

HasState

HasState statePath(string|null $path)

No description

Parameters

string|null $path

Return Value

HasState

mixed getDefaultState()

No description

Return Value

mixed

mixed getState()

No description

Return Value

mixed

mixed getOldState()

No description

Return Value

mixed

string getStatePath(bool $isAbsolute = true)

No description

Parameters

bool $isAbsolute

Return Value

string

bool hasStatePath()

No description

Return Value

bool

protected bool hasDefaultState()

No description

Return Value

bool

bool isDehydrated()

No description

Return Value

bool

bool isDehydratedWhenHidden()

No description

Return Value

bool

bool isHiddenAndNotDehydrated()

No description

Return Value

bool

Get getGetCallback()

No description

Return Value

Get

Set getSetCallback()

No description

Return Value

Set

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

No description

Parameters

Component $path
bool $isAbsolute

Return Value

string

protected void flushCachedAbsoluteStatePath()

No description

Return Value

void

HasState stripCharacters(string|array|Closure|null $characters)

No description

Parameters

string|array|Closure|null $characters

Return Value

HasState

array getStripCharacters()

No description

Return Value

array