You are here

public function SocialSimpleManager::getNetworks in Social simple 8

Same name and namespace in other branches
  1. 2.0.x src/SocialSimpleManager.php \Drupal\social_simple\SocialSimpleManager::getNetworks()

Gets all the instantiated social networks.

Return value

array The social network label keyed by network_id.

Overrides SocialSimpleManagerInterface::getNetworks

File

src/SocialSimpleManager.php, line 99

Class

SocialSimpleManager
Provides a social network manager.

Namespace

Drupal\social_simple

Code

public function getNetworks() {
  foreach ($this
    ->getSortedNetworks() as $id => $network) {
    $networks[$id] = $network
      ->getLabel();
  }
  return $networks;
}