function(cb) {
            // Callback is optional
            cb = util.optional(cb);

            // Grab policies config & policy modules and trigger callback
            this.loadMiddleware(function (err) {
                if (err) return cb(err);

                sails.log.verbose('Finished loading policy middleware logic.');
                cb();
            }.bind(this));

            // Before routing, curry controller functions with appropriate policy chains
            sails.on('router:before', this.bindPolicies);
        }
function(cb) {
            
            cb = util.optional(cb);

            
            this.loadMiddleware(function (err) {
                if (err) return cb(err);

                sails.log.verbose('Finished loading policy middleware logic.');
                cb();
            }.bind(this));

            
            sails.on('router:before', this.bindPolicies);
        }
function ( cb ) { // Callback is optional cb = util . optional ( cb ) ; // Grab policies config & policy modules and trigger callback this . loadMiddleware ( function ( err ) { if ( err ) return cb ( err ) ; sails . log . verbose ( 'Finished loading policy middleware logic.' ) ; cb ( ) ; } . bind ( this ) ) ; // Before routing, curry controller functions with appropriate policy chains sails . on ( 'router:before' , this . bindPolicies ) ; }
Initialize is fired first thing when the hook is loaded

@api public
Initialize is fired first thing when the hook is loaded