You are here

public function PrintPage::getLinkAttributes in Social simple 2.0.x

Same name and namespace in other branches
  1. 8 src/SocialNetwork/PrintPage.php \Drupal\social_simple\SocialNetwork\PrintPage::getLinkAttributes()

Get common attributes for the share link.

Parameters

string $network_name: The social network name.

Return value

array $attributes an array of link attributes.

Overrides SocialNetworkInterface::getLinkAttributes

1 call to PrintPage::getLinkAttributes()
PrintPage::getShareLink in src/SocialNetwork/PrintPage.php
Checks whether the given transition is allowed.

File

src/SocialNetwork/PrintPage.php, line 73

Class

PrintPage
The Printer button.

Namespace

Drupal\social_simple\SocialNetwork

Code

public function getLinkAttributes($network_name) {
  $attributes = [
    'title' => $network_name,
    'data-popup-open' => 'false',
    'onClick' => 'window.print();',
  ];
  return $attributes;
}