public function getSetting($setting_key, $focus = null, $user = null)
    {
        $params = array();
        $params['setting_key'] = $setting_key;

        if ($focus) {
            $params['focus'] = $focus;
        }

        if ($user) {
            $params['user'] = $user;
        }

        $setting = $this->findOneBy($params);

        if ($setting) {
            return $setting->getValue();
        }

        return null;
    }
public function getSetting($setting_key, $focus = null, $user = null)
    {
        $params = array();
        $params['setting_key'] = $setting_key;

        if ($focus) {
            $params['focus'] = $focus;
        }

        if ($user) {
            $params['user'] = $user;
        }

        $setting = $this->findOneBy($params);

        if ($setting) {
            return $setting->getValue();
        }

        return null;
    }
public function getSetting ( $ setting_key , $ focus = null , $ user = null ) { $ params = array ( ) ; $ params [ 'setting_key' ] = $ setting_key ; if ( $ focus ) { $ params [ 'focus' ] = $ focus ; } if ( $ user ) { $ params [ 'user' ] = $ user ; } $ setting = $ this -> findOneBy ( $ params ) ; if ( $ setting ) { return $ setting -> getValue ( ) ; } return null ; }
Get setting by parameters
Get setting by parameters