code: function (category) {
                      if (typeof category === 'undefined') {
                          var result = {}, prefs = stateService.keys('preferences');
                          for (var i = 0; i < prefs.length; i++) {
                              if (prefs[i].indexOf('pref-') === 0) {
                                  result[prefs[i].substring(5)] = stateService.state('preferences', prefs[i]).value();
                              }
                          }
                          return result;
                      }
  
                      return stateService.state('preferences', 'pref-' + category).value();
                  }
docs: @ngdoc function
  @name w20CoreEnv.service:PreferencesService#preferences
  @methodOf w20CoreEnv.service:PreferencesService
  @param {String} category The preference category.
  @returns {Object} An object containing all the preference from the given category.
  
  @description
  
  Returns all the preferences for a given category.