Class: Preparser

Core.ConfigLoader Preparser

Preparser

new Preparser(attributes, options)

modules/core/configLoader/preparser.js, line 21
Loading and preperation for parsing (calls parser for default or custom tree) of the configuration file (config.json).
Name Type Description
attributes * todo
options * todo
Fires:

Extends

Methods

addTranslationToRawConfig(subconf, prefix){Void}

modules/core/configLoader/preparser.js, line 192
recursive function (!) - adds a translation function named i18nextTranslate := function(setter) to each element in subconf found to be translated
Name Type Description
subconf Object the raw response of the config.json - this is the raw data from the file before any changes are made; for recursion: this is the subobject of any object in the config.json
prefix String the prefix of values to use to recognize them for translation

changeLgvContainer(){void}

modules/core/configLoader/preparser.js, line 296
Changing the lgv-container to masterportal-container
Deprecated
  • in 3.0.0. Remove whole function and call!
    Returns:
    no returned value

    fetchData(defaultConfigPath){void}

    modules/core/configLoader/preparser.js, line 33
    Fetches the Data from the config.json.
    Name Type Description
    defaultConfigPath string The default path to config.json

    getUrlPath(configJsonPathFromConfig, configJsonPathFromUrl, defaultConfigPath){string}

    modules/core/configLoader/preparser.js, line 99
    Build url to config file. Decide between absolute or relative path.
    Name Type Default Description
    configJsonPathFromConfig string "" optional url for the config.json configured in config.js
    configJsonPathFromUrl string "" optional The config parameter from the url, which parsed in util.
    defaultConfigPath string "config.json" optional The default path to config.json
    Returns:
    to config file

    parse(response){*}

    modules/core/configLoader/preparser.js, line 121
    todo
    Name Type Description
    response * todo

    parseIsFolderSelectable(globalFlag){*}

    modules/core/configLoader/preparser.js, line 310
    todo
    Name Type Description
    globalFlag * todo

    requestConfigFromUtil(){string}

    modules/core/configLoader/preparser.js, line 88
    Request config path from util. This seperate helper method enables unit tests of the getUrlPath-method.
    Fires:
    • Util#event:RadioRequestGetConfig
    Returns:
    path or absolute url to config file

    requestSnippetInfos(){*}

    modules/core/configLoader/preparser.js, line 321
    todo

    updateTreeType(attributes, response){Object}

    modules/core/configLoader/preparser.js, line 277
    Update the preparsed treeType from attributes to be downward compatible.
    Name Type Description
    attributes Object Preparased portalconfig attributes.
    response Object Config from config.json.
    Deprecated
    • in 3.0.0. Remove whole function and call!
      Returns:
      Attributes with mapped treeType