public function SocialSimpleManager::addNetwork in Social simple 8
Same name and namespace in other branches
- 2.0.x src/SocialSimpleManager.php \Drupal\social_simple\SocialSimpleManager::addNetwork()
Adds another social network builder.
Parameters
\Drupal\social_simple\SocialNetwork\SocialNetworkInterface $network: The social network builder to add.
int $priority: Priority of the social network builder.
Overrides SocialSimpleManagerInterface::addNetwork
File
- src/
SocialSimpleManager.php, line 56
Class
- SocialSimpleManager
- Provides a social network manager.
Namespace
Drupal\social_simpleCode
public function addNetwork(SocialNetworkInterface $network, $priority) {
$network_id = $network
->getId();
$this->networks[$network_id][$priority][] = $network;
// Force the builders to be re-sorted.
$this->sortedNetworks = NULL;
}