trait FluentBadgeTrait (View source)

Methods

protected
DBField|null
addFluentBadge(DBField|null $badgeField, DataObject $record)

Add the Fluent state badge before any existing badges and return the result

public
DBField|null
getBadge(DataObject $record)

Given a record with Fluent enabled, return a badge that represents the state of it in the current locale

protected
string
generateBadgeHTML(DataObject $record, Locale $locale, array $extraProperties = [])

No description

Details

protected DBField|null addFluentBadge(DBField|null $badgeField, DataObject $record)

Add the Fluent state badge before any existing badges and return the result

Parameters

DBField|null $badgeField

Existing badge to merge with

DataObject $record

Return Value

DBField|null

DBField|null getBadge(DataObject $record)

Given a record with Fluent enabled, return a badge that represents the state of it in the current locale

Parameters

DataObject $record

Return Value

DBField|null

protected string generateBadgeHTML(DataObject $record, Locale $locale, array $extraProperties = [])

No description

Parameters

DataObject $record
Locale $locale
array $extraProperties

Return Value

string