Tc.Application Class
Responsible for application-wide issues such as the creation of modules and establishing connections between them.
Item Index
Methods
Properties
Methods
end
-
hook
Registers a hook that is called at the end.
Parameters:
-
hook
FunctionThe hook function to be executed
init
-
$ctx
-
config
Initializes the application.
Parameters:
-
$ctx
JQueryThe jQuery context
-
config
ObjectThe configuration
registerConnection
-
connector
-
component
Registers a connection between a module and a connector.
Parameters:
-
connector
StringThe full connector name (e.g. MasterSlave-Navigation)
-
component
ModuleThe module instance
registerModule
-
$node
-
modName
-
skins
-
connectors
Registers a module.
Parameters:
-
$node
JQueryThe module node
-
modName
StringThe module name. It must match the class name of the module
-
skins
ArrayA list of skin names. Each entry must match a class name of a skin
-
connectors
ArrayA list of connectors identifiers (e.g. MasterSlave-Navigation) Schema: {connectorName}-{connectorId}
Returns:
The reference to the registered module
registerModules
-
$ctx
Register modules withing scope Automatically registers all modules within the scope, as long as the modules use the OOCSS naming conventions.
Parameters:
-
$ctx
JQueryThe jQuery context
Returns:
A list containing the references of the registered modules
start
-
modules
Starts (intializes) the registered modules.
Parameters:
-
modules
ArrayA list of the modules to start
stop
-
modules
Stops the registered modules.
Parameters:
-
modules
ArrayA list containing the module instances to stop
unregisterConnection
-
connectorId
-
component
Unregisters a module from a connector.
Parameters:
-
connectorId
StringThe connector channel id (e.g. 2)
-
component
ModuleThe module instance
unregisterModules
-
modules
Unregisters the modules given by the module instances.
Parameters:
-
modules
ArrayA list containing the module instances to unregister
Properties
$ctx
JQuery
The jQuery context.
config
Object
The configuration.
connectors
Object
Contains references to all connectors on the page.
modules
Array
Contains references to all modules on the page. This can, for example, be useful when there are interactions between Flash objects and Javascript.
sandbox
Sandbox
The sandbox to get the resources from This sandbox is shared between all modules.