Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Behavior

Implements

Index

Constructors

constructor

  • Creates a new Behavior - a collection of commands that are run sequentially.

    Parameters

    • app: Application

      The framework Application.

    • name: string

      The name that can be used to reference the behavior.

    • commands: string[]

      The array of commands to be run when the behavior is executed.

    • Optional event: string

    Returns Behavior

Properties

app

Instance of the {@link application.Application} that this behavior belongs to.

commands

commands: string[]

Array of {@link framework.commands.Command} that will be run when this behavior is executed.

event

event: string

The event that triggers this behavior.

eventToken

eventToken: string

The token associated with the event that this behavior is associated with.

name

name: string

Name that will be used to retrieve this behavior from the registry.

Methods

Protected _executeCommands

  • _executeCommands(args: any): void
  • Executes all of the commands associated with this behavior.

    Parameters

    • args: any

      A common parameter that will be accepted by all commands executed by the behavior.

    Returns void

Protected _wireUpEvent

  • _wireUpEvent(): void
  • Associates the behavior with an event if there is one present.

    Returns void

destroy

  • destroy(): void
  • Used to clear any associoated events and to dismiss the commands.

    Returns void

run

  • run(args: any): void
  • Runs the behavior on demand. Reccomanded when events and commands parameters don't match nicely.

    Parameters

    • args: any

      A common parameter that will be accepted by all commands executed by the behavior.

    Returns void