ResolvableActionInterface Class
Surface API to handle ResolvableAction implementations. This allows a source object and target object to have separate action resolution logic without directly referencing eachother. See also PerformableActionInterface, PerformableAction
Item Index
Methods
canResolveAction
(
Boolean
-
action
-
source
-
[settings]
Checks if a target can resolve an action with given source and settings. this
is the target.
Parameters:
-
action
String- The action being performed on this target to resolve.
-
source
Object- The source object performing the action on this target.
-
[settings]
Object optional- Settings for the action.
Returns:
Boolean:
true
if action was successfully resolved
performAction
(
Boolean
-
action
-
source
-
[settings]
Resolves an action on target from source with given settings.
Parameters:
-
action
String- The action being performed on this target to resolve.
-
source
Object- The source object performing the action on this target.
-
[settings]
Object optional- Settings for the action.
-
[skipCanResolveAction]
Object optional- If true skips checking that
this.skipCanResolveAction(action, source, settings) == true
- If true skips checking that
Returns:
Boolean:
true
if the action was successfully resolved.
setResolvableAction
(
-
action
-
[implementation]
Sets a resolvable action implementation on object.
Parameters:
-
action
String- The action name.
-
[implementation]
ResolvableAction optional- Object to set as the action implementation.