Constructor
new CommentFormOperationRegistry(commentForm)
Create an operation registry.
Parameters:
Name | Type | Description |
---|---|---|
commentForm |
CommentForm |
Methods
add(type, optionsopt, clearMessagesopt) → {CommentFormOperation}
Add an operation to the registry.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
type |
'load' | 'preview' | 'viewChanges' | 'submit' | |||
options |
object |
<optional> |
{}
|
|
clearMessages |
boolean |
<optional> |
true
|
Whether to clear messages above the comment form. |
Returns:
- Type
- CommentFormOperation
closeAll()
Close all registered operations.
filter(callback) → {Array.<CommentFormOperation>}
Find operations for which the specified callback returns a truthy value.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
Returns:
- Type
- Array.<CommentFormOperation>
filterByType(type) → {Array.<CommentFormOperation>}
Find operations of the specified type in the registry.
Parameters:
Name | Type | Description |
---|---|---|
type |
'load' | 'preview' | 'viewChanges' | 'submit' | Operation type. |
Returns:
- Type
- Array.<CommentFormOperation>
remove(operation)
Remove an operation from the registry.
Parameters:
Name | Type | Description |
---|---|---|
operation |
CommentFormOperation |