trait CanFormatState (View source)

Properties

protected Closure|null $formatStateUsing
protected int|Closure|null $characterLimit
protected string|Closure|null $characterLimitEnd
protected int|Closure|null $wordLimit
protected string|Closure|null $wordLimitEnd
protected string|Closure|null $prefix
protected string|Closure|null $suffix
protected bool $isListedAsJson

Methods

limit(int|Closure|null $length = 100, string|Closure|null $end = '...')

No description

words(int|Closure|null $words = 100, string|Closure|null $end = '...')

No description

prefix(string|Closure|null $prefix)

No description

suffix(string|Closure|null $suffix)

No description

formatStateUsing(Closure|null $callback)

No description

mixed
formatState(mixed $state)

No description

string|null
getFormattedState()

No description

int|null
getCharacterLimit()

No description

string|null
getCharacterLimitEnd()

No description

int|null
getWordLimit()

No description

string|null
getWordLimitEnd()

No description

string|null
getPrefix()

No description

string|null
getSuffix()

No description

listAsJson(bool $condition = true)

No description

bool
isListedAsJson()

No description

Details

CanFormatState limit(int|Closure|null $length = 100, string|Closure|null $end = '...')

No description

Parameters

int|Closure|null $length
string|Closure|null $end

Return Value

CanFormatState

CanFormatState words(int|Closure|null $words = 100, string|Closure|null $end = '...')

No description

Parameters

int|Closure|null $words
string|Closure|null $end

Return Value

CanFormatState

CanFormatState prefix(string|Closure|null $prefix)

No description

Parameters

string|Closure|null $prefix

Return Value

CanFormatState

CanFormatState suffix(string|Closure|null $suffix)

No description

Parameters

string|Closure|null $suffix

Return Value

CanFormatState

CanFormatState formatStateUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

CanFormatState

mixed formatState(mixed $state)

No description

Parameters

mixed $state

Return Value

mixed

string|null getFormattedState()

No description

Return Value

string|null

int|null getCharacterLimit()

No description

Return Value

int|null

string|null getCharacterLimitEnd()

No description

Return Value

string|null

int|null getWordLimit()

No description

Return Value

int|null

string|null getWordLimitEnd()

No description

Return Value

string|null

string|null getPrefix()

No description

Return Value

string|null

string|null getSuffix()

No description

Return Value

string|null

CanFormatState listAsJson(bool $condition = true)

No description

Parameters

bool $condition

Return Value

CanFormatState

bool isListedAsJson()

No description

Return Value

bool