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

private DEFAULT_ICON

private DEFAULT_IMPORTANCE_LEVEL

Methods

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

No description

public
array
getTipSchema()

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

public
string
getImportanceLevel()

No description

public
Tip
setImportanceLevel(string $importance_level)

No description

public
string
getIcon()

No description

public
Tip
setIcon(string $icon)

No description

public
string
getMessage()

No description

public
Tip
setMessage(string $message)

No description

Details

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

No description

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

No description

Return Value

string

Tip setImportanceLevel(string $importance_level)

No description

Parameters

string $importance_level

Return Value

Tip

Exceptions

InvalidArgumentException

string getIcon()

No description

Return Value

string

Tip setIcon(string $icon)

No description

Parameters

string $icon

Return Value

Tip

string getMessage()

No description

Return Value

string

Tip setMessage(string $message)

No description

Parameters

string $message

Return Value

Tip