public function switchState($sStateCode)
    {
        if (empty($sStateCode) || !PluginManager::instance()->hasPlugin('RainLab.Location')) {
            return;
        }

        $this->obActiveState = \RainLab\Location\Models\State::whereCode($sStateCode)->first();
    }
public function switchState($sStateCode)
    {
        if (empty($sStateCode) || !PluginManager::instance()->hasPlugin('RainLab.Location')) {
            return;
        }

        $this->obActiveState = \RainLab\Location\Models\State::whereCode($sStateCode)->first();
    }
public function switchState ( $ sStateCode ) { if ( empty ( $ sStateCode ) || ! PluginManager :: instance ( ) -> hasPlugin ( 'RainLab.Location' ) ) { return ; } $ this -> obActiveState = \ RainLab \ Location \ Models \ State :: whereCode ( $ sStateCode ) -> first ( ) ; }
Switch active state by code
@param string $sStateCode
Switch active state by code