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 Htmlable|Closure|null $prefix
protected Htmlable|Closure|null $suffix
protected string|Closure|null $timezone
protected bool|Closure $isHtml
protected bool|Closure $isMarkdown
protected bool $isDate
protected bool $isDateTime
protected bool $isMoney
protected bool $isNumeric
protected bool $isTime

Methods

markdown(bool|Closure $condition = true)

No description

date(string|null $format = null, string|null $timezone = null)

No description

dateTime(string|null $format = null, string|null $timezone = null)

No description

since(string|null $timezone = null)

No description

dateTooltip(string|null $format = null, string|null $timezone = null)

No description

dateTimeTooltip(string|null $format = null, string|null $timezone = null)

No description

timeTooltip(string|null $format = null, string|null $timezone = null)

No description

sinceTooltip(string|null $timezone = null)

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

time(string|null $format = null, string|null $timezone = null)

No description

timezone(string|Closure|null $timezone)

No description

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(Htmlable|Closure|null $prefix)

No description

suffix(Htmlable|Closure|null $suffix)

No description

html(bool|Closure $condition = true)

No description

formatStateUsing(Closure|null $callback)

No description

mixed
formatState(mixed $state)

No description

int|null
getCharacterLimit()

No description

string|null
getCharacterLimitEnd()

No description

int|null
getWordLimit()

No description

string|null
getWordLimitEnd()

No description

string
getTimezone()

No description

bool
isHtml()

No description

Htmlable|null
getPrefix()

No description

Htmlable|null
getSuffix()

No description

bool
isMarkdown()

No description

bool
isDate()

No description

bool
isDateTime()

No description

bool
isMoney()

No description

bool
isNumeric()

No description

bool
isTime()

No description

Details

CanFormatState markdown(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanFormatState

CanFormatState date(string|null $format = null, string|null $timezone = null)

No description

Parameters

string|null $format
string|null $timezone

Return Value

CanFormatState

CanFormatState dateTime(string|null $format = null, string|null $timezone = null)

No description

Parameters

string|null $format
string|null $timezone

Return Value

CanFormatState

CanFormatState since(string|null $timezone = null)

No description

Parameters

string|null $timezone

Return Value

CanFormatState

CanFormatState dateTooltip(string|null $format = null, string|null $timezone = null)

No description

Parameters

string|null $format
string|null $timezone

Return Value

CanFormatState

CanFormatState dateTimeTooltip(string|null $format = null, string|null $timezone = null)

No description

Parameters

string|null $format
string|null $timezone

Return Value

CanFormatState

CanFormatState timeTooltip(string|null $format = null, string|null $timezone = null)

No description

Parameters

string|null $format
string|null $timezone

Return Value

CanFormatState

CanFormatState sinceTooltip(string|null $timezone = null)

No description

Parameters

string|null $timezone

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 time(string|null $format = null, string|null $timezone = null)

No description

Parameters

string|null $format
string|null $timezone

Return Value

CanFormatState

CanFormatState timezone(string|Closure|null $timezone)

No description

Parameters

string|Closure|null $timezone

Return Value

CanFormatState

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(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

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

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 getTimezone()

No description

Return Value

string

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

bool isDate()

No description

Return Value

bool

bool isDateTime()

No description

Return Value

bool

bool isMoney()

No description

Return Value

bool

bool isNumeric()

No description

Return Value

bool

bool isTime()

No description

Return Value

bool