public function getConfigValue($moduleId, $variableName, $defaultValue = null, $valueLocale = null)
    {
        $value = null;

        $configValue = self::create()
            ->filterByModuleId($moduleId)
            ->filterByName($variableName)
            ->findOne();
        ;

        if (null !== $configValue) {
            if (null !== $valueLocale) {
                $configValue->setLocale($valueLocale);
            }

            $value = $configValue->getValue();
        }

        return $value === null ? $defaultValue : $value;
    }
public function getConfigValue($moduleId, $variableName, $defaultValue = null, $valueLocale = null)
    {
        $value = null;

        $configValue = self::create()
            ->filterByModuleId($moduleId)
            ->filterByName($variableName)
            ->findOne();
        ;

        if (null !== $configValue) {
            if (null !== $valueLocale) {
                $configValue->setLocale($valueLocale);
            }

            $value = $configValue->getValue();
        }

        return $value === null ? $defaultValue : $value;
    }
public function getConfigValue ( $ moduleId , $ variableName , $ defaultValue = null , $ valueLocale = null ) { $ value = null ; $ configValue = self :: create ( ) -> filterByModuleId ( $ moduleId ) -> filterByName ( $ variableName ) -> findOne ( ) ; ; if ( null !== $ configValue ) { if ( null !== $ valueLocale ) { $ configValue -> setLocale ( $ valueLocale ) ; } $ value = $ configValue -> getValue ( ) ; } return $ value === null ? $ defaultValue : $ value ; }
Get a module's configuration variable

@param  int    $moduleId     the module id
@param  string $variableName the variable name
@param  string $defaultValue the default value, if variable is not defined
@param  null   $valueLocale  the required locale, or null to get default one
@return string the variable value
Get a module s configuration variable