Constructor
new Message(messageWrapper) → {Drupal.Message~messageDefinition}
Parameters:
Name | Type | Description |
---|---|---|
messageWrapper |
HTMLElement | The zone where to add messages. If no element is provided an attempt is made to determine a default location. |
- Source:
Returns:
Class to add and remove messages.
Methods
(static) announce(message, options)
Helper to call Drupal.announce() with the right parameters.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
message |
string | Displayed message. |
||||||||||||||||
options |
object | Additional data. Properties
|
- Source:
(static) defaultWrapper() → {HTMLElement}
Attempt to determine the default location for inserting JavaScript messages or create one if needed.
- Source:
Returns:
The default destination for JavaScript messages.
- Type
- HTMLElement
(static) getMessageTypeLabels() → {Object}
Provide an object containing the available message types.
- Source:
Returns:
An object containing message type strings.
- Type
- Object
(static) messageInternalWrapper(messageWrapper) → {HTMLElement}
Function for creating the internal message wrapper element.
Parameters:
Name | Type | Description |
---|---|---|
messageWrapper |
HTMLElement | The message wrapper. |
- Source:
Returns:
The internal wrapper DOM element.
- Type
- HTMLElement
Type Definitions
messageDefinition
Type:
- class
- Source: