You are here

public function SocialSimpleManager::get in Social simple 2.0.x

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

Gets the instantiated social network service.

Parameters

string $network_id: The network id.

Return value

\Drupal\social_simple\SocialNetwork\SocialNetworkInterface The social network service.

Overrides SocialSimpleManagerInterface::get

File

src/SocialSimpleManager.php, line 89

Class

SocialSimpleManager
Provides a social network manager.

Namespace

Drupal\social_simple

Code

public function get($network_id) {
  if (!isset($this->sortedNetworks[$network_id])) {
    return [];
  }
  return $this->sortedNetworks[$network_id];
}