2017 © Pedro Peláez
 

symfony-bundle social-links-bundle

Symfony bundle that is using SocialLinks to generate share links for social networks.

image

astina/social-links-bundle

Symfony bundle that is using SocialLinks to generate share links for social networks.

  • Monday, October 2, 2017
  • by pkraeutli
  • Repository
  • 19 Watchers
  • 11 Stars
  • 42,316 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 7 Versions
  • 3 % Grown

The README.md

Astina Social Links Bundle

AstinaSocialLinksBundle is basically a wrapper around oscarotero/social-links. Its main purpose is to generate social links based on given provider., (*1)

Currently supported providers., (*2)

Install

Step 1: Add to composer.json

``` yml "require" : { // ... "astina/social-links-bundle":"dev-master", }, (*3)


### Step 2: Enable the bundle Enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Astina\Bundle\SocialLinksBundle\AstinaSocialLinksBundle(), ); }

Usage

Main functionality of this bundle is to generate a social link for given provider and url. It can be used as an twig extension, like in the example below., (*4)

Basic usage:, (*5)

``` twig {{ social_link('facebook') }}, (*6)


**Extended usage:** ``` twig {{ social_link('facebook', 'http://www.astina.ch', {'text': 'Custom text', attributes: {'class': 'custom-share', 'target': '_self'} }, 'Custom link text') }}

This example will return an HTML response which looks like., (*7)

``` html , (*8)


Helper accepts three parameters - provider as string, url as string, options as multidimensional array and link text as string. There you can basically add as many custom attributes as you want. Options and default values: ``` php 'title' => null 'text' => null 'options' => array('attributes' => array('target' => '_blank')) 'linkText => null

Template extending

It is also possible to extend a social link template, by simply adding a socialLink.html.twig template in app/Resources/AstinaSocialLinksBundle/views/SocialLinks., (*9)

Run tests

bash bin/phpunit, (*10)

The Versions

02/10 2017

dev-master

9999999-dev http://astina.ch

Symfony bundle that is using SocialLinks to generate share links for social networks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Astina AG

social links astina share

02/10 2017

2.3.0

2.3.0.0 http://astina.ch

Symfony bundle that is using SocialLinks to generate share links for social networks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Astina AG

social links astina share

01/04 2016

2.2.0

2.2.0.0 http://astina.ch

Symfony bundle that is using SocialLinks to generate share links for social networks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Astina AG

social links astina share

17/11 2014

2.1.0

2.1.0.0 http://astina.ch

Symfony bundle that is using SocialLinks to generate share links for social networks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Astina AG

social links astina share

07/11 2014

2.0.0

2.0.0.0 http://astina.ch

Symfony bundle that is using SocialLinks to generate share links for social networks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Astina AG

social links astina share

28/10 2014

1.0.1

1.0.1.0 http://astina.ch

Symfony bundle that is using SocialLinks to generate share links for social networks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Astina AG

social links astina share

24/10 2014

1.0.0

1.0.0.0 http://astina.ch

Symfony bundle that is using SocialLinks to generate share links for social networks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Astina AG

social links astina share