Add Config::IsCustomValue($sPropCode) method to know if a parameter has been changed or not

This commit is contained in:
Molkobain
2021-01-18 10:26:15 +01:00
parent 7d9f73f650
commit 9f962eb40f

View File

@@ -1412,6 +1412,19 @@ class Config
return $this->m_aSettings[$sPropCode]['value'];
}
/**
* Return true is the $sPropCode parameter has been customized, false if it is the default value.
*
* @param string $sPropCode
*
* @return bool
* @since 3.0.0
*/
public function IsCustomValue(string $sPropCode): bool
{
return $this->m_aSettings[$sPropCode]['value'] !== $this->m_aSettings[$sPropCode]['default'];
}
/**
* Event log options (see LOG_... definition)
*/