public function SocialSimpleGeneratorInterface::buildSocialLinks in Social simple 8
Same name and namespace in other branches
- 2.0.x src/SocialSimpleGeneratorInterface.php \Drupal\social_simple\SocialSimpleGeneratorInterface::buildSocialLinks()
Build the render array of social share links.
Parameters
array $networks: An array of social network name keyed with network id.
string $title: The title to use for the share links.
\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::buildSocialLinks()
- SocialSimpleGenerator::buildSocialLinks in src/
SocialSimpleGenerator.php - Build the render array of social share links.
File
- src/
SocialSimpleGeneratorInterface.php, line 44
Class
- SocialSimpleGeneratorInterface
- Interface SocialSimpleGeneratorInterface.
Namespace
Drupal\social_simpleCode
public function buildSocialLinks(array $networks, $title, EntityInterface $entity = NULL, array $options = []);