/** * Return configuration values which are mainly defined by TSconfig. * The configPath must begin with "setup." or "mod." * "setup" is mapped to tx_dam TSConfig key. * * @param string $configPath Pointer to an "object" in the TypoScript array, fx. 'setup.selections.default' * @param boolean $getProperties return the properties array instead of the value. Means to return the stuff set by a dot. Eg. setup.xxxx.xxx * @return mixed Just the value or when $getProperties is set an array with the properties of the $configPath. */ function config_getValue($configPath = '', $getProperties = false) { require_once PATH_txdam . 'lib/class.tx_dam_config.php'; return tx_dam_config::getValue($configPath, $getProperties); }
/** * Check a config value if its enabled * Anything except '' and 0 is true * If the the option is not set the default value will be returned * * @param string $configPath Pointer to an "object" in the TypoScript array, fx. 'setup.selections.default' * @param mixed $default Default value when option is not set, otherwise the value itself * @return boolean */ function checkValueEnabled($configPath, $default = false) { $parts = t3lib_div::revExplode('.', $configPath, 2); $config = tx_dam_config::getValue($parts[0], true); return tx_dam_config::isEnabledOption($config, $parts[1], $default); }