Version

Configuration.getFeature

This method is used to get the configuration settings of a feature in the Configuration File (config.plist).

Syntax

SPlus.Configuration.getFeature (featureKey, function (featureConfig){
        var enabled = featureConfig['Enabled'];
        var settings = featureConfig['Settings'];
        var _title = settings ['Title']
        //TODO: Get all settings
        //TODO: Implement what to do with the configuration settings
}, function (errorResponse){
        var error = errorResponse['error#displayValue']; //Getting the error
        //TODO: Implement how to handle errors
});

Configuration.getFeature Parameters

Parameter

Type

Description

featureKey

String

The feature’s Key.

onSuccess callback function

Parameter

Description

function (featureConfig)

Success callback function to be implemented, which receives a JavaScript Object with the complete configuration settings for the specified feature.

onError callback function

Parameter

Description

function (eResponse)

Error callback function to be implemented, which receives the eResponse JavaScript Object.