Builds Twitter button provider.

@return \EzSystems\ShareButtonsBundle\SocialShare\ProviderInterface
162138
public function buildTwitter()
    {
        $twitterProvider = new TwitterProvider(array(
            'showUsername' => $this->configResolver->getParameter('twitter.show_username', 'ez_share_buttons'),
            'largeButton' => $this->configResolver->getParameter('twitter.large_button', 'ez_share_buttons'),
            'language' => $this->configResolver->getParameter('twitter.language', 'ez_share_buttons'),
        ));

        return $twitterProvider;
    }
601659
public function build(): SynthesizePinchGestureRequest
	{
		$instance = new SynthesizePinchGestureRequest();
		if ($this->x === null) {
			throw new BuilderException('Property [x] is required.');
		}
		$instance->x = $this->x;
		if ($this->y === null) {
			throw new BuilderException('Property [y] is required.');
		}
		$instance->y = $this->y;
		if ($this->scaleFactor === null) {
			throw new BuilderException('Property [scaleFactor] is required.');
		}
		$instance->scaleFactor = $this->scaleFactor;
		$instance->relativeSpeed = $this->relativeSpeed;
		$instance->gestureSourceType = $this->gestureSourceType;
		return $instance;
	}
1370083
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder('hwi_oauth');

        if (method_exists($builder, 'getRootNode')) {
            $rootNode = $builder->getRootNode();
        } else {
            // BC layer for symfony/config 4.1 and older
            $rootNode = $builder->root('hwi_oauth');
        }

        $rootNode
            ->fixXmlConfig('firewall_name')
            ->children()
                ->arrayNode('firewall_names')
                    ->isRequired()
                    ->requiresAtLeastOneElement()
                    ->prototype('scalar')->end()
                ->end()
                ->scalarNode('target_path_parameter')->defaultNull()->end()
                ->booleanNode('use_referer')->defaultFalse()->end()
                ->booleanNode('failed_use_referer')->defaultFalse()->end()
                ->scalarNode('failed_auth_path')->defaultValue('hwi_oauth_connect')->end()
                ->scalarNode('grant_rule')
                    ->defaultValue('IS_AUTHENTICATED_REMEMBERED')
                    ->validate()
                        ->ifTrue(function ($role) {
                            return !('IS_AUTHENTICATED_REMEMBERED' === $role || 'IS_AUTHENTICATED_FULLY' === $role);
                        })
                        ->thenInvalid('Unknown grant role set "%s".')
                    ->end()
                ->end()
            ->end()
        ;

        $this->addHttpClientConfiguration($rootNode);
        $this->addConnectConfiguration($rootNode);
        $this->addFosubConfiguration($rootNode);
        $this->addResourceOwnersConfiguration($rootNode);

        return $builder;
    }
1220054
protected function getButtons()
    {
        /** @var UriBuilder $uriBuilder */
        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);

        $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();

        // Create new
        $newRecordButton = $buttonBar->makeLinkButton()
            ->setHref((string)$uriBuilder->buildUriFromRoute(
                'record_edit',
                [
                    'edit' => ['sys_redirect' => ['new'],
                ],
                'returnUrl' => (string)$uriBuilder->buildUriFromRoute('site_redirects'),
            ]
            ))
            ->setTitle($this->getLanguageService()->getLL('redirect_add_text'))
            ->setIcon($this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL));
        $buttonBar->addButton($newRecordButton, ButtonBar::BUTTON_POSITION_LEFT, 10);

        // Reload
        $reloadButton = $buttonBar->makeLinkButton()
            ->setHref(GeneralUtility::getIndpEnv('REQUEST_URI'))
            ->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.reload'))
            ->setIcon($this->iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL));
        $buttonBar->addButton($reloadButton, ButtonBar::BUTTON_POSITION_RIGHT);

        // Shortcut
        $mayMakeShortcut = $this->getBackendUserAuthentication()->mayMakeShortcut();
        if ($mayMakeShortcut) {
            $getVars = ['id', 'route'];

            $shortcutButton = $buttonBar->makeShortcutButton()
                ->setModuleName('site_redirects')
                ->setGetVariables($getVars);
            $buttonBar->addButton($shortcutButton, ButtonBar::BUTTON_POSITION_RIGHT);
        }
    }
1243827
public function getConfigTreeBuilder()
    {
        $tree_builder = new TreeBuilder();
        $root_node    = $tree_builder->root('twitter_api_client');

        $root_node
            ->children()
                ->arrayNode('twitter')
                    ->children()
                        ->scalarNode('api_key')->end()
                        ->scalarNode('api_secret')->end()
                    ->end()
                ->end()
            ->end()
        ;

        return $tree_builder;
    }
1364035
public function getButton()
    {
        if ($class = $this->config()->button_class) {
            
            // Create Button:
            
            $button = $class::create();
            
            // Extend Button:
            
            $this->extend('updateButton', $button);
            
            // Answer Button:
            
            return $button;
            
        }
    }
1351409
public function getProviders()
	{
		$haconfig = $this->config['hybridauth'];
		$providers = array();

		//iterate over the social providers in the config
		foreach (array_get($haconfig, 'providers', array()) as $provider => $config)
		{
			if (array_get($config, 'enabled'))
			{
				$providers[] = $provider;
			}
		}

		return $providers;
	}
466113
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('config');

        if (!array_key_exists('third-party-connect', $config))
        {
            throw new \Exception('You must copy the third-party-connect.local.php.dist file to your config/autoload directory.');
        }

        return new TwitterService($config['third-party-connect']['twitter'], $serviceLocator->get('request'));
    }
303414
public function showShareButtons(
        Twig_Environment $twigEnvironment,
        array $options = array(),
        array $providers = array()
    ) {
        $this->shareButtonsRenderer->setTemplateEngine($twigEnvironment);

        if (isset($providers)) {
            $options['providers'] = $providers;
        }

        if (!isset($options['template'])) {
            $options['template'] = $this->configResolver->getParameter('template', 'ez_share_buttons');
        }

        return $twigEnvironment->render(sprintf(
            'EzSystemsShareButtonsBundle::%s.html.twig',
            $options['template']
        ), array(
            'shareButtons' => $this->shareButtonsRenderer->render($options),
        ));
    }
101815
public function buildLinkedin()
    {
        $linkedinProvider = new LinkedinProvider(array(
            'countMode' => $this->configResolver->getParameter('linkedin.count_mode', 'ez_share_buttons'),
            'language' => $this->configResolver->getParameter('linkedin.language', 'ez_share_buttons'),
        ));

        return $linkedinProvider;
    }
936063
protected function createEztextingDriver()
    {
        $config = $this->app['config']->get('sms.eztexting', []);

        $provider = new EZTextingSMS(new Client());

        $data = [
            'User'     => $config['username'],
            'Password' => $config['password'],
        ];

        $provider->buildBody($data);

        return $provider;
    }
971776
public function getProvider($label)
    {
        if (!isset($this->providers[$label])) {
            throw new InvalidArgumentException(sprintf('Unknown share button provider `%s`', $label));
        }

        return $this->providers[$label];
    }
1110485
protected function bootstrapApp()
    {
        $namespace = $this->getUserNamespace();

        // Load service provider
        $serviceProvider = $namespace.'\\'.$namespace.'ServiceProvider';
        $hasServiceProvider = class_exists($serviceProvider);
        if ($hasServiceProvider) {
            $plugins = (array) $this->config->get('plugins.loaded');
            $plugins[] = $serviceProvider;
            $this->config->set('plugins.loaded', $plugins);
        }

        return $hasServiceProvider;
    }
761751
public function build()
    {
        $soapClientFactory = new SoapClientFactory();
        $soapClient = $soapClientFactory->factory($this->wsdl, $this->soapOptions);

        $client = new Client($soapClient, $this->username, $this->password, $this->token);

        if ($this->log) {
            $logPlugin = new LogPlugin($this->log);
            $client->getEventDispatcher()->addSubscriber($logPlugin);
        }

        return $client;
    }
1000120
private function build() {

    	if(null === $this -> text) {

    		$html = '<input type="'. $this -> type .'"';
    		
    		foreach($this -> attributes as $attribute => $value) {
    		    $html .= ' ' . $attribute . '="'. Escape :: attr($value) .'"';
    		}

    		$html .= '>';

    		return $html;
    	}

        $this -> fill();
        
        $html = '<button';
        
        foreach($this -> attributes as $attribute => $value) {
            $html .= ' ' . $attribute . '="'. Escape :: attr($value) .'"';
        }

        $html .= '>' . Escape :: html($this -> text) . '</button>';

        return $html;
        
    }
905699
protected function createLabsMobileDriver()
    {
        $config = $this->app['config']->get('sms.labsmobile', []);

        $provider = new LabsMobileSMS(new Client());

        $auth = [
            'username' => $config['username'],
            'password' => $config['password'],
        ];

        $provider->buildBody($auth);

        return $provider;
    }
42099
public function getEnabledProviders()
    {
        $social = $this->getSocial();
        $enabled = array();
        if (isset($social['providers'])) {
            $providers = $social['providers'];
            if (!empty($providers) && is_array($providers)) {
                foreach ($providers as $provider => $config) {
                    if ($config['enabled']) {
                        $enabled[] = strtolower($provider);
                    }
                }
            }
        }

        return $enabled;
    }