2017 © Pedro Peláez
 

symfony-bundle shariff-bundle

This bundle provides a wrapper for using shariff inside the sonata-project.

image

core23/shariff-bundle

This bundle provides a wrapper for using shariff inside the sonata-project.

  • Saturday, July 14, 2018
  • by core23
  • Repository
  • 1 Watchers
  • 1 Stars
  • 100 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 1 Forks
  • 0 Open issues
  • 11 Versions
  • 2 % Grown

The README.md

NucleosShariffBundle

Latest Stable Version Latest Unstable Version License, (*1)

Total Downloads Monthly Downloads Daily Downloads, (*2)

Continuous Integration Code Coverage Type Coverage, (*3)

This bundle provides a wrapper for using shariff inside the symfony sonata-project., (*4)

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*5)

composer require nucleos/shariff-bundle

Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in config/bundles.php file of your project:, (*6)

// config/bundles.php

return [
    // ...
    Nucleos\ShariffBundle\NucleosShariffBundle::class => ['all' => true],
];

Define cache, http client and request factory:, (*7)

# config/routes/nucleos_shariff.yaml

framework:
    cache:
        pools:
            cache.shariff:
                adapter: cache.adapter.filesystem

nucleos_shariff:
    cache: 'cache.shariff'
    http_client: 'some.http.client'         # e.g httplug.client
    request_factory: 'some.request.factory' # e.g. nyholm.psr7.psr17_factory

Assets

It is recommended to use webpack / webpack-encore to include the shariff.js and shariff.css file in your page., (*8)

You can use npm or yarn to load the library:, (*9)

npm install shariff
yarn add shariff

Configure the Bundle

Create a configuration file called nucleos_shariff.yaml:, (*10)

# config/routes/nucleos_shariff.yaml

nucleos_shariff:
    resource: "@NucleosShariffBundle/Resources/config/routing/backend.yml"

Create a configuration file called framework_cache.yaml:, (*11)

framework:
    cache:
        pools:
            cache.shariff:
                adapter: cache.adapter.filesystem

Usage

{# template.twig #}

{{ sonata_block_render({ 'type': 'nucleos_shariff.block.share' }, {
    'url': 'https://example.com/site.html'
}) }}

Configure the Bundle

You can globally configure the services that should count the likes or favorites for a page., (*12)

nucleos_shariff:
    cache: 'cache.shariff'
    http_client: 'some.http.client'
    request_factory: 'some.request.factory'

    options:
        domains: [ ] # Allow specific domains for shariff
        services: [ 'addthis', 'buffer', 'facebook', 'pinterest', 'reddit', 'stumbleupon', 'vk', 'xing' ]

    services:
        facebook:
            app_id:  "1234567890"
            secret:  "GENERATEDSECRET"
            version: "5.0"

This is a fork of shariff-php with a more modern and dynamic solution., (*13)

License

This bundle is under the MIT license., (*14)

The Versions

26/06 2016

1.1.2

1.1.2.0 https://core23.de

This bundle provides a wrapper for using shariff inside the sonata-project.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Gripp

bundle symfony google widget sonata facebook twitter block heise shariff

24/02 2016

1.1.1

1.1.1.0 https://core23.de

This bundle provides a wrapper for using shariff inside the sonata-project.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Gripp

bundle symfony google widget sonata facebook twitter block heise shariff

24/02 2016

1.1.0

1.1.0.0 https://core23.de

This bundle provides a wrapper for using shariff inside the sonata-project.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Gripp

bundle symfony google widget sonata facebook twitter block heise shariff

12/02 2016

1.0.4

1.0.4.0 https://core23.de

This bundle provides a wrapper for using shariff inside the sonata-project.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Gripp

bundle symfony google widget sonata facebook twitter block heise shariff

15/01 2016

1.0.3

1.0.3.0 https://core23.de

This bundle provides a wrapper for using shariff inside the sonata-project.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Gripp

bundle symfony google widget sonata facebook twitter block heise shariff

20/12 2015

1.0.2

1.0.2.0 https://core23.de

This bundle provides a wrapper for using shariff inside the sonata-project.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Gripp

bundle symfony google widget sonata facebook twitter block heise shariff

13/11 2015

1.0.1

1.0.1.0 https://core23.de

This bundle provides a wrapper for using shariff inside the sonata-project.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Gripp

bundle symfony google widget sonata facebook twitter block heise shariff

01/11 2015

1.0.0

1.0.0.0 https://core23.de

This bundle provides a wrapper for using shariff inside the sonata-project.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Gripp

bundle symfony google widget sonata facebook twitter block heise shariff