trait CanFormatState (View source)

Properties

protected Closure|null $formatStateUsing
protected string|Closure|null $placeholder
protected Htmlable|Closure|null $prefix
protected Htmlable|Closure|null $suffix
protected bool|Closure $isHtml
protected bool|Closure $isMarkdown

Methods

formatStateUsing(Closure|null $callback)

No description

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

No description

money(string|Closure|null $currency = null, int $divideBy = 0, string|Closure|null $locale = null)

No description

numeric(int|Closure|null $decimalPlaces = null, ArgumentValue $decimalSeparator = ArgumentValue::Default, ArgumentValue $thousandsSeparator = ArgumentValue::Default, int|Closure|null $maxDecimalPlaces = null, string|Closure|null $locale = null)

No description

placeholder(string|Closure|null $placeholder)

No description

markdown(bool|Closure $condition = true)

No description

prefix(Htmlable|Closure|null $prefix)

No description

suffix(Htmlable|Closure|null $suffix)

No description

html(bool|Closure $condition = true)

No description

mixed
formatState(mixed $state)

No description

bool
isHtml()

No description

Htmlable|null
getPrefix()

No description

Htmlable|null
getSuffix()

No description

bool
isMarkdown()

No description

Details

CanFormatState formatStateUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

CanFormatState

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

No description

Parameters

int $length
string|null $end

Return Value

CanFormatState

CanFormatState money(string|Closure|null $currency = null, int $divideBy = 0, string|Closure|null $locale = null)

No description

Parameters

string|Closure|null $currency
int $divideBy
string|Closure|null $locale

Return Value

CanFormatState

CanFormatState numeric(int|Closure|null $decimalPlaces = null, ArgumentValue $decimalSeparator = ArgumentValue::Default, ArgumentValue $thousandsSeparator = ArgumentValue::Default, int|Closure|null $maxDecimalPlaces = null, string|Closure|null $locale = null)

No description

Parameters

int|Closure|null $decimalPlaces
ArgumentValue $decimalSeparator
ArgumentValue $thousandsSeparator
int|Closure|null $maxDecimalPlaces
string|Closure|null $locale

Return Value

CanFormatState

CanFormatState placeholder(string|Closure|null $placeholder)

No description

Parameters

string|Closure|null $placeholder

Return Value

CanFormatState

CanFormatState markdown(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanFormatState

CanFormatState prefix(Htmlable|Closure|null $prefix)

No description

Parameters

Htmlable|Closure|null $prefix

Return Value

CanFormatState

CanFormatState suffix(Htmlable|Closure|null $suffix)

No description

Parameters

Htmlable|Closure|null $suffix

Return Value

CanFormatState

CanFormatState html(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanFormatState

mixed formatState(mixed $state)

No description

Parameters

mixed $state

Return Value

mixed

bool isHtml()

No description

Return Value

bool

Htmlable|null getPrefix()

No description

Return Value

Htmlable|null

Htmlable|null getSuffix()

No description

Return Value

Htmlable|null

bool isMarkdown()

No description

Return Value

bool