kartik\social\GithubXPlugin::init PHP Method

init() public method

Initialize the widget
public init ( )
    public function init()
    {
        parent::init();
        $this->setConfig('githubX');
        if (empty($this->user)) {
            throw new InvalidConfigException("The GitHub 'user' must be set.");
        }
        if (empty($this->repo) && $this->type !== self::FOLLOW) {
            throw new InvalidConfigException("The GitHub 'repository' has not been set.");
        }
        if (empty($this->type)) {
            throw new InvalidConfigException("The GitHub button 'type' has not been set.");
        }
        if (!isset($this->noscript)) {
            $this->noscript = Yii::t('kvsocial', 'Please enable JavaScript on your browser to view the Facebook {pluginName} plugin correctly on this site.', ['pluginName' => Yii::t('kvsocial', str_replace('fb-', '', $this->type))]);
        }
    }