Invoke the specified method for each enabled addon. @private @method eachAddonInvoke @param {String} methodName the method to invoke on each addon @param {Array} args the arguments to pass to the invoked method
(methodName, args)
| 465 | @param {Array} args the arguments to pass to the invoked method |
| 466 | */ |
| 467 | eachAddonInvoke(methodName, args) { |
| 468 | this.initializeAddons(); |
| 469 | |
| 470 | let invokeArguments = args || []; |
| 471 | |
| 472 | return this.addons.reduce((sum, addon) => { |
| 473 | let method = addon[methodName]; |
| 474 | if (method) { |
| 475 | let val = method.apply(addon, invokeArguments); |
| 476 | if (val) { |
| 477 | sum.push(val); |
| 478 | } |
| 479 | } |
| 480 | return sum; |
| 481 | }, []); |
| 482 | }, |
| 483 | |
| 484 | /** |
| 485 | Invoke the specified method for each of the project's addons. |
nothing calls this directly
no test coverage detected
searching dependent graphs…