API Docs for: 2.1.0
Show:

Tc.Module Class

Defined in: dist/terrific.js:795
Module: Tc

Base class for the different modules.

Methods

attachConnector

(
  • connector
)

Attaches a connector (observer).

Parameters:

  • connector Connector

    The connector to attach

detachConnector

(
  • connector
)

Detaches a connector (observer).

Parameters:

  • connector Connector

    The connector to detach

fire

(
  • state
  • data
  • channels
  • defaultAction
)

Notifies all attached connectors about changes.

Parameters:

  • state String

    The new state

  • data Object

    The data to provide to your connected modules (optional)

  • channels Array

    A list containing the channel ids to send the event to (optional)

  • defaultAction Function

    The default action to perform (optional)

getDecoratedModule

(
  • module
  • skin
)
Module

Decorates itself with the given skin.

Parameters:

  • module String

    The name of the module

  • skin String

    The name of the skin

Returns:

Module:

The decorated module

init

(
  • $ctx
  • sandbox
  • id
)

Initializes the Module.

Parameters:

  • $ctx JQuery

    The jQuery context

  • sandbox Sandbox

    The sandbox to get the resources from

  • id String

    The Unique module ID

initAfter

() protected

Initialization callback.

start

()

Template method to start (i.e. init) the module. This method provides hook functions which can be overridden by the individual instance.

stop

()

Template method to stop the module.

Properties

$ctx

JQuery

Contains the module context.

connectors

Object

Contains the attached connectors.

id

String

Contains the unique module ID.

sandbox

Sandbox

The sandbox to get the resources from.