website/core/mediator.js
function(moduleID, message, data) {
		if (C.DEBUG) {
			console.log("[" + moduleID + "] publish(): ", message, data);
		}

		for (var i in _modules) {
			var subscriptions = _modules[i].subscriptions;

			// if this module has subscribed to this event, call the callback function
			if (subscriptions.hasOwnProperty(message)) {
				subscriptions[message]({
					sender: moduleID,
					data: data
				});
			}
		}
	}
function(moduleID, message, data) {
		if (C.DEBUG) {
			console.log("[" + moduleID + "] publish(): ", message, data);
		}

		for (var i in _modules) {
			var subscriptions = _modules[i].subscriptions;

			// if this module has subscribed to this event, call the callback function
			if (subscriptions.hasOwnProperty(message)) {
				subscriptions[message]({
					sender: moduleID,
					data: data
				});
			}
		}
	}
function ( moduleID , message , data ) { if ( C . DEBUG ) { console . log ( "[" + moduleID + "] publish(): " , message , data ) ; } for ( var i in _modules ) { var subscriptions = _modules [ i ] . subscriptions ; // if this module has subscribed to this event, call the callback function if ( subscriptions . hasOwnProperty ( message ) ) { subscriptions [ message ] ( { sender : moduleID , data : data } ) ; } } }
Publishes a message to anyone who's subscribed to it.
@param moduleID
@param message
@param data
@private
Publishes a message to anyone who s subscribed to it .