You are here

protected function FileLinkItem::getHttpClient in File Link 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Field/FieldType/FileLinkItem.php \Drupal\file_link\Plugin\Field\FieldType\FileLinkItem::getHttpClient()

Returns the HTTP client service.

Return value

\GuzzleHttp\Client The Guzzle client.

File

src/Plugin/Field/FieldType/FileLinkItem.php, line 302

Class

FileLinkItem
Implements a 'file_link' plugin field type.

Namespace

Drupal\file_link\Plugin\Field\FieldType

Code

protected function getHttpClient() {
  if (!isset($this->httpClient)) {
    $this->httpClient = \Drupal::httpClient();
  }
  return $this->httpClient;
}