class Tip (View source)

Represents a Tip which can be rendered alongside a form field in the front-end.

See the Tip component in the silverstripe/admin module.

Constants

IMPORTANCE_LEVELS

These map to levels in the front-end Tip component

DEFAULT_ICON

DEFAULT_IMPORTANCE_LEVEL

Methods

__construct(string $message, string $importance_level = self::DEFAULT_IMPORTANCE_LEVEL, string $icon = self::DEFAULT_ICON)

No description

array
getTipSchema()

Outputs props to be passed to the front-end Tip component.

string
getImportanceLevel()

No description

Tip
setImportanceLevel(string $importance_level)

No description

string
getIcon()

No description

Tip
setIcon(string $icon)

No description

string
getMessage()

No description

Tip
setMessage(string $message)

No description

Details

__construct(string $message, string $importance_level = self::DEFAULT_IMPORTANCE_LEVEL, string $icon = self::DEFAULT_ICON)

Parameters

string $message

The message to display in the tip

string $importance_level

How important the tip is (normal or high). Informs the color and description.

string $icon

The icon that should be used on the Tip button

Exceptions

InvalidArgumentException

array getTipSchema()

Outputs props to be passed to the front-end Tip component.

Return Value

array

string getImportanceLevel()

Return Value

string

Tip setImportanceLevel(string $importance_level)

Parameters

string $importance_level

Return Value

Tip

Exceptions

InvalidArgumentException

string getIcon()

Return Value

string

Tip setIcon(string $icon)

Parameters

string $icon

Return Value

Tip

string getMessage()

Return Value

string

Tip setMessage(string $message)

Parameters

string $message

Return Value

Tip