{"size": 721, "ext": "js", "max_stars_repo_path": "webapp/controller/Base.controller.js", "max_stars_repo_name": "integrtr/ui5-firevswater", "max_stars_repo_stars_event_min_datetime": "2021-06-17T07:56:32.000Z", "max_stars_repo_stars_event_max_datetime": "2021-08-03T13:48:52.000Z", "max_issues_repo_path": "webapp/controller/Base.controller.js", "max_issues_repo_name": "integrtr/ui5-firevswater", "max_issues_repo_issues_event_min_datetime": "2021-06-08T15:34:31.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-08T15:34:31.000Z", "max_forks_repo_path": "webapp/controller/Base.controller.js", "max_forks_repo_name": "integrtr/ui5-firevswater", "max_forks_repo_forks_event_min_datetime": "2020-12-11T08:32:38.000Z", "max_forks_repo_forks_event_max_datetime": "2020-12-11T08:32:38.000Z"}
{"max_stars_count": 3, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 26.7037037037, "max_line_length": 81, "alphanum_fraction": 0.6449375867}
sap.ui.define(['sap/ui/core/mvc/Controller'], function (Controller) {
  'use strict';

  return Controller.extend('integrtr.ui5firevswater.controller.BaseController', {
    FIREBASE: 'firebase',
    UIModel: 'UIModel',

    onInit: function () {},

    getRouter: function () {
      return this.getOwnerComponent().getRouter();
    },

    getModel: function (name) {
      return this.getOwnerComponent().getModel(name);
    },
    /**
     * language switch event
     * @param {Object} event sap.ui.base.Event
     */
    onLanguageSwitch: function (event) {
      const languageCode = event.getParameter('selectedItem').getKey();
      sap.ui.getCore().getConfiguration().setLanguage(languageCode);
    },
  });
});
