applyModule(module, push = true) {
    if (!module) return;
    if (push && this.modules) this.modules.push(module);
    else if (push) this.modules = [module];

    if (this.manager) this.manager.active(module);

    if (module.manager && this.manager) module.manager(this.manager);
    else if (module.manager) {
      throw new ManagerError(
        'Component',
        `Module requires ModuleManager that is turned off for this component`,
        this, module
      );
    }

    if (module.integrate) module.integrate.bind(this)(module);

    return module;
  }
@method applyModule
@instance
@description .applyModule is also used in .integrateModules() function.
It does exactly what its name says (applies module to component or app).
@param {Object} module the module to apply
@param {Boolean} [push=true] flag to determine whether to add it to the array
@return {Object} Returns module that was applied.
@throws {ManagerError}
@memberof module:core.ModuleSystem