Download

Concepts

Example

Documentation

Plugins

How to

Contribute

Links

Helper

What is this ?

The Helper class is the base class ModelHelper and ControllerHelper extends from. There is a few utility methods in it. Perhaps you will never need to use these methods which are mainly used by the framework itself.

Helper methods

getWZName()

Will return the name of the Helper you are using. Example :

var ModuleController = Class.create(ControllerHelper, {
	...					   
	init: function($super) {
		$super();
		alert(this.getWZName()); // ModuleController
	},
	...
});	

var ModuleModel = Class.create(ModelHelper, {
	...					   
	init: function($super) {
		$super();
		alert(this.getWZName()); // ModuleModel
	},
	...
});	

getWZType()

Will return the type of your helper. Can be either controllerHelper or modelHelper. Example :

var ModuleController = Class.create(ControllerHelper, {
	...						   
	init: function($super) {
		$super();
		alert(this.getWZType()); // controllerHelper
	},
	...
});	

var ModuleModel = Class.create(ModelHelper, {
	...					   
	init: function($super) {
		$super();
		alert(this.getWZType()); // modelHelper
	},
	...
});	

getWZMultitonId()

Will return the multitonId of your helper. It is a number between 1 and more. If your module is a type simple (see Module configuration file section), it will return 1. If your module is a type mutiple, it will return the index (multitonId) of your module. See the module type section for more information on type multiple.