You are here

public function SocialSimpleGeneratorInterface::generateSocialLinks in Social simple 2.0.x

Same name and namespace in other branches
  1. 8 src/SocialSimpleGeneratorInterface.php \Drupal\social_simple\SocialSimpleGeneratorInterface::generateSocialLinks()

Build the social share links.

Parameters

array $networks: An array of social network name keyed with network id.

\Drupal\Core\Entity\EntityInterface $entity: The entity if provided.

array $options: Additional options to pass as a query for the url built. The array must be keyed by network_id. Example. $options = [ 'twitter' => [ 'hastags' => 'hashtag1, hashtag2', ], ];.

Return value

array $links An array of social share links.

1 method overrides SocialSimpleGeneratorInterface::generateSocialLinks()
SocialSimpleGenerator::generateSocialLinks in src/SocialSimpleGenerator.php
Build the social share links.

File

src/SocialSimpleGeneratorInterface.php, line 66

Class

SocialSimpleGeneratorInterface
Interface SocialSimpleGeneratorInterface.

Namespace

Drupal\social_simple

Code

public function generateSocialLinks(array $networks, EntityInterface $entity = NULL, array $options = []);