Skip to content
PHP Ecosystem
Explore

Message

API reference › Bootstrap 6 › exception › Message

enumyii2\extensions\bootstrap6\exception\Message
Backed bystring
Sourcesrc/exception/Message.php

Represents error message templates for exceptions thrown by the extension.

Use Message::getMessage() to format a template with sprintf() arguments.

CaseValueDescription
INVALID_ITEMS"The 'items' option is required."Error when a widget requires a non-empty items option.
INVALID_VALUE"Invalid value '%s' for '%s'. Allowed values: %s."Error when an option receives a value outside its allowed set.
ITEM_CONTENT_REQUIRED"The 'content' option is required."Error when an item is missing its content option.
ITEM_LABEL_REQUIRED"The 'label' option is required."Error when an item is missing its label option.
MODULE_SCRIPT_UNAVAILABLE"The asset bundle '%s' does not list a module script."Error when an asset bundle lists no script to import as a module.
OPTION_REQUIRED"The '%s' option is required."Error when a configuration array is missing a required option.
PACKAGE_VERSION_UNAVAILABLE"Unable to read the version of npm package '%s' from '%s'."Error when the version of an npm package cannot be read for CDN delivery.
PROPERTY_REQUIRED"The '%s' property must be set."Error when a widget property that has no usable default is not set.
UNKNOWN_PLUGIN"Unknown Bootstrap plugin '%s'."Error when a widget registers a plugin that the Bootstrap bundle does not export.
MethodDescriptionDefined by
getMessage()Returns the formatted message string for the error case.Message
public function getMessage(int|string ...$args): string

Returns the formatted message string for the error case.

Parameters

ParameterTypeDescription
...$argsint|stringValues to insert into the message template.

Returns

string: Formatted error message with interpolated arguments.