lib/definitions/eventExtender.js
function (evt, callback) {
    if (this.id && dotty.exists(evt, this.id)) {
      debug('found viewmodel id in event');
      return callback(null, dotty.get(evt, this.id));
    }

    if (this.getNewIdForThisEventExtender) {
      debug('[' + this.name + '] found eventextender id getter in event');
      return this.getNewIdForThisEventExtender(evt, callback);
    }
    
    debug('not found viewmodel id in event, generate new id');
    this.collection.getNewId(callback);
  }
function (evt, callback) {
    if (this.id && dotty.exists(evt, this.id)) {
      debug('found viewmodel id in event');
      return callback(null, dotty.get(evt, this.id));
    }

    if (this.getNewIdForThisEventExtender) {
      debug('[' + this.name + '] found eventextender id getter in event');
      return this.getNewIdForThisEventExtender(evt, callback);
    }
    
    debug('not found viewmodel id in event, generate new id');
    this.collection.getNewId(callback);
  }
function ( evt , callback ) { if ( this . id && dotty . exists ( evt , this . id ) ) { debug ( 'found viewmodel id in event' ) ; return callback ( null , dotty . get ( evt , this . id ) ) ; } if ( this . getNewIdForThisEventExtender ) { debug ( '[' + this . name + '] found eventextender id getter in event' ) ; return this . getNewIdForThisEventExtender ( evt , callback ) ; } debug ( 'not found viewmodel id in event, generate new id' ) ; this . collection . getNewId ( callback ) ; }
Extracts the id from the event or generates a new one.
@param {Object}   evt      The event object.
@param {Function} callback The function that will be called when this action has finished
`function(err, id){}`
Extracts the id from the event or generates a new one .