Class MBX.JsModel
Defined in: js_model.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Use this to create instances of models and extend all models (and instances of all models)
|
Method Attributes | Method Name and Description |
---|---|
<static> |
MBX.JsModel.create(name, opts)
Used for creating a new JsModel
|
<static> |
MBX.JsModel.destroyModel(name)
Destroy a controller and unsubscribe its event listeners
|
<static> |
MBX.JsModel.extend(methsAndAttrs)
Extends all JsModels
|
<static> |
MBX.JsModel.extendInstancePrototype(methsAndAttrs)
Extend all instances of all models
|
Class Detail
MBX.JsModel()
Use this to create instances of models and extend all models (and instances of all models)
Method Detail
<static>
MBX.JsModel.create(name, opts)
Used for creating a new JsModel
var MyModel = MBX.JsModel.create("MyModel"); var instance = MyModel.create();
- Parameters:
- {String} name
- model name used to prevent name collision
- {Object} opts
- defaults to {}
<static>
MBX.JsModel.destroyModel(name)
Destroy a controller and unsubscribe its event listeners
- Parameters:
- {String} name
- the name of the controller
<static>
MBX.JsModel.extend(methsAndAttrs)
Extends all JsModels
- Parameters:
- {Object} methsAndAttrs
- the methods and attributes to extend all models with
<static>
MBX.JsModel.extendInstancePrototype(methsAndAttrs)
Extend all instances of all models
- Parameters:
- {Object} methsAndAttrs
- the methods and attributes to extend all models' instances with