kartik\social\Widget::setConfig PHP Method

setConfig() public method

Sets configuration for a widget based on the module level configuration
public setConfig ( string $widget )
$widget string name of the widget
    public function setConfig($widget)
    {
        $config = $this->getConfig($widget);
        if (empty($config)) {
            return;
        }
        foreach ($config as $key => $value) {
            if (property_exists(get_class($this), $key)) {
                if ($key == 'settings') {
                    $this->settings = $this->settings + $value;
                } elseif (empty($this->{$key})) {
                    $this->{$key} = $value;
                }
            }
        }
        if (empty($this->language) && isset(self::$defaultLanguage[$widget])) {
            $this->language = self::$defaultLanguage[$widget];
        }
    }