You are here

public function RemoteManager::getChannelsInfos in Entity Share 8.2

Same name and namespace in other branches
  1. 8.3 modules/entity_share_client/src/Service/RemoteManager.php \Drupal\entity_share_client\Service\RemoteManager::getChannelsInfos()
  2. 8 modules/entity_share_client/src/Service/RemoteManager.php \Drupal\entity_share_client\Service\RemoteManager::getChannelsInfos()

Get the channels infos of a remote website.

Parameters

\Drupal\entity_share_client\Entity\RemoteInterface $remote: The remote website on which to get the channels infos.

Return value

array An array of channel infos as returned by entity_share_server entry point.

Overrides RemoteManagerInterface::getChannelsInfos

File

modules/entity_share_client/src/Service/RemoteManager.php, line 88

Class

RemoteManager
Class RemoteManager.

Namespace

Drupal\entity_share_client\Service

Code

public function getChannelsInfos(RemoteInterface $remote) {
  $http_client = $this
    ->prepareJsonApiClient($remote);
  $response = $this->requestService
    ->request($http_client, 'GET', 'entity_share');
  $json = Json::decode((string) $response
    ->getBody());
  return $json['data']['channels'];
}