trait CanFormatState (View source)

Properties

protected Closure|null $formatStateUsing
protected int|null $limit
protected string|Closure|null $prefix
protected string|Closure|null $suffix
protected string|Closure|null $placeholder
protected string|Closure|null $timezone

Methods

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

enum(Arrayable $options, $default = null)

No description

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

No description

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

No description

prefix(string|Closure $prefix)

No description

suffix(string|Closure $suffix)

No description

placeholder(string|Closure|null $placeholder)

No description

html()

No description

formatStateUsing(Closure|null $callback)

No description

money(string|Closure|null $currency = null, bool $shouldConvert = false)

No description

getFormattedState()

No description

int|null
getLimit()

No description

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

No description

timezone(string|Closure|null $timezone)

No description

string
getTimezone()

No description

Details

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 enum(Arrayable $options, $default = null)

No description

Parameters

Arrayable $options
$default

Return Value

CanFormatState

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

No description

Parameters

int $length
string $end

Return Value

CanFormatState

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

No description

Parameters

int $words
string $end

Return Value

CanFormatState

CanFormatState prefix(string|Closure $prefix)

No description

Parameters

string|Closure $prefix

Return Value

CanFormatState

CanFormatState suffix(string|Closure $suffix)

No description

Parameters

string|Closure $suffix

Return Value

CanFormatState

CanFormatState placeholder(string|Closure|null $placeholder)

No description

Parameters

string|Closure|null $placeholder

Return Value

CanFormatState

CanFormatState html()

No description

Return Value

CanFormatState

CanFormatState formatStateUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

CanFormatState

CanFormatState money(string|Closure|null $currency = null, bool $shouldConvert = false)

No description

Parameters

string|Closure|null $currency
bool $shouldConvert

Return Value

CanFormatState

getFormattedState()

No description

int|null getLimit()

No description

Return Value

int|null

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

string getTimezone()

No description

Return Value

string