lib/modules/apostrophe-areas/lib/helpers.js
function(widget, options) {
      var manager = self.getWidgetManager(widget.type);
      if (!manager) {
        // Not configured in this project
        self.warnMissingWidgetType(widget.type);
        return '';
      }
      var partial;
      if (!manager.options.wrapperTemplate) {
        partial = _.partial(self.partial, 'widget');
      } else {
        partial = _.partial(manager.partial, manager.options.wrapperTemplate);
      }
      return partial({
        // The widget minus any properties that don't
        // absolutely need to be crammed into a JSON
        // attribute for the editor's benefit. Good filtering
        // here prevents megabytes of markup. -Tom and Sam
        dataFiltered: manager.filterForDataAttribute(widget),
        manager: manager,
        widget: widget,
        options: options,
        output: function() {
          return manager.output(widget, options);
        }
      });
    }
function(widget, options) {
      var manager = self.getWidgetManager(widget.type);
      if (!manager) {
        // Not configured in this project
        self.warnMissingWidgetType(widget.type);
        return '';
      }
      var partial;
      if (!manager.options.wrapperTemplate) {
        partial = _.partial(self.partial, 'widget');
      } else {
        partial = _.partial(manager.partial, manager.options.wrapperTemplate);
      }
      return partial({
        // The widget minus any properties that don't
        // absolutely need to be crammed into a JSON
        // attribute for the editor's benefit. Good filtering
        // here prevents megabytes of markup. -Tom and Sam
        dataFiltered: manager.filterForDataAttribute(widget),
        manager: manager,
        widget: widget,
        options: options,
        output: function() {
          return manager.output(widget, options);
        }
      });
    }
function ( widget , options ) { var manager = self . getWidgetManager ( widget . type ) ; if ( ! manager ) { // Not configured in this project self . warnMissingWidgetType ( widget . type ) ; return '' ; } var partial ; if ( ! manager . options . wrapperTemplate ) { partial = _ . partial ( self . partial , 'widget' ) ; } else { partial = _ . partial ( manager . partial , manager . options . wrapperTemplate ) ; } return partial ( { // The widget minus any properties that don't // absolutely need to be crammed into a JSON // attribute for the editor's benefit. Good filtering // here prevents megabytes of markup. -Tom and Sam dataFiltered : manager . filterForDataAttribute ( widget ) , manager : manager , widget : widget , options : options , output : function ( ) { return manager . output ( widget , options ) ; } } ) ; }
apos.areas.widget renders one widget. Invoked by both `apos.area` and `apos.singleton`. Not often called directly, but see `area.html` if you are interested in doing so.
apos . areas . widget renders one widget . Invoked by both apos . area and apos . singleton . Not often called directly but see area . html if you are interested in doing so .