(function(){if(!window.Djblets){window.Djblets={}}"use strict";Djblets.Extension=Backbone.Model.extend({defaults:{id:null,name:null,settings:{}},initialize:function initialize(){this.hooks=[]}});"use strict";Djblets.ExtensionHook=Backbone.Model.extend({hookPoint:null,defaults:{extension:null},initialize:function initialize(){var extension=this.get("extension");console.assert(this.hookPoint,"This ExtensionHook subclass must define hookPoint");console.assert(extension,"An Extension instance must be passed to ExtensionHook");extension.hooks.push(this);this.hookPoint.addHook(this);this.setUpHook()},setUpHook:function setUpHook(){}},{each:function each(cb,context){_.each(this.prototype.hookPoint.hooks,cb,context)}});"use strict";Djblets.ExtensionHookPoint=Backbone.Model.extend({initialize:function initialize(){this.hooks=[]},addHook:function addHook(hook){this.hooks.push(hook)}})}).call(this);
