2017 © Pedro Peláez
 

library iguana-share

image

dxw/iguana-share

  • Friday, December 22, 2017
  • by tomdxw
  • Repository
  • 4 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Iguana Share

This package provides a reusable way to output simple, accessible lists of social sharing buttons which can be styled according to your need., (*1)

Available buttons: Facebook, Google Plus, LinkedIn and Twitter., (*2)

How to use

Install the package: composer require dxw/iguana-share. You will also need Iguana Theme Helpers installed., (*3)

Register the Share Buttons class in your app/di.php Iguana file, passing in an instance of the Iguana Helper class, and the classes for the buttons you require. e.g., (*4)

$registrar->addInstance(new \Dxw\Iguana\Theme\Helpers());
$registrar->addInstance(\Dxw\Iguana\Share\ShareButtons(
    $registrar->getInstance(\Dxw\Iguana\Theme\Helpers::class,
        [
            new Dxw\Iguana\Share\FacebookShareLink();
            new Dxw\Iguana\Share\LinkedInShareLink();
            new Dxw\Iguana\Share\TwitterShareLink();
        ]
    )
))

Then call h()->shareButtons() in your template file to output the share buttons HTML., (*5)

The Versions