Plugin Environment Function setting()

public final function setting(
$name
)

Summary

Checks the value of a setting for this Plugin.

Where You Can Use It

Can be used in methods called by plugins. From Zenario 7.0.0 onwards.

Description

Retrieves the values of one of your Plugin's settings defined in your Plugin's description.xml.

Note that the CMS won't run any validation of this value; you should validate it yourself if needed.

Parameters

$name

The name of the setting to look up.

Return Value

The value of the setting requested.

Example

if ($this->setting('enable_feature_x')) {
    $this->featureX();
}

Here a method is executed if a setting evaluates to true.