/** * Check a config value if its enabled * Anything except '' and 0 is true * * @param mixed $value Value to be checked * @return mixed Return false if value is empty or 0, otherwise the value itself */ function config_isEnabled($value) { require_once PATH_txdam . 'lib/class.tx_dam_config.php'; return tx_dam_config::isEnabled($value); }
/** * Check a config value if its enabled * Anything except '' and 0 is true * * @param array $config Configuration array * @param string $option Option key. If not set in $config default value will be returned * @param mixed $default Default value when option is not set, otherwise the value itself * @return boolean */ function isEnabledOption($config, $option, $default = false) { if (!isset($config[$option])) { return $default; } return tx_dam_config::isEnabled($config[$option]); }