interface SocialNetworkInterface in Social simple 2.0.x
Same name and namespace in other branches
- 8 src/SocialNetwork/SocialNetworkInterface.php \Drupal\social_simple\SocialNetwork\SocialNetworkInterface
Defines the interface for social network.
Allows for each social network to build its shared url, and to add additionnal options to the url built.
Hierarchy
- interface \Drupal\social_simple\SocialNetwork\SocialNetworkInterface
Expanded class hierarchy of SocialNetworkInterface
All classes that implement SocialNetworkInterface
3 files declare their use of SocialNetworkInterface
File
- src/
SocialNetwork/ SocialNetworkInterface.php, line 13
Namespace
Drupal\social_simple\SocialNetworkView source
interface SocialNetworkInterface {
/**
* Checks whether the given transition is allowed.
*
* @param string $share_url
* The url to share.
* @param string $title
* The page's title to share.
* @param \Drupal\Core\Entity\EntityInterface $entity
* The parent entity.
* @param array $additional_options
* Additional options to pass as que query parameter to the social link.
*
* @return array
* the renderable array of the social share link.
*/
public function getShareLink($share_url, $title = '', EntityInterface $entity = NULL, array $additional_options = []);
/**
* Get the network name.
*
* @return string
* the network name.
*/
public function getLabel();
/**
* Get the network id.
*
* @return string
* the network id.
*/
public function getId();
/**
* Get common attributes for the share link.
*
* @param string $network_name
* The social network name.
*
* @return array $attributes
* an array of link attributes.
*/
public function getLinkAttributes($network_name);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SocialNetworkInterface:: |
public | function | Get the network id. | 7 |
SocialNetworkInterface:: |
public | function | Get the network name. | 7 |
SocialNetworkInterface:: |
public | function | Get common attributes for the share link. | 7 |
SocialNetworkInterface:: |
public | function | Checks whether the given transition is allowed. | 7 |