function AnnounceFetcher::__construct

Same name in other branches
  1. 11.x core/modules/announcements_feed/src/AnnounceFetcher.php \Drupal\announcements_feed\AnnounceFetcher::__construct()

Construct an AnnounceFetcher service.

Parameters

\GuzzleHttp\ClientInterface $httpClient: The http client.

\Drupal\Core\Config\ConfigFactoryInterface $config: The config factory service.

\Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface $temp_store: The tempstore factory service.

\Psr\Log\LoggerInterface $logger: The logger service.

string $feedUrl: The feed url path.

File

core/modules/announcements_feed/src/AnnounceFetcher.php, line 52

Class

AnnounceFetcher
Service to fetch announcements from the external feed.

Namespace

Drupal\announcements_feed

Code

public function __construct(ClientInterface $httpClient, ConfigFactoryInterface $config, KeyValueExpirableFactoryInterface $temp_store, LoggerInterface $logger, string $feedUrl) {
    $this->config = $config->get('announcements_feed.settings');
    $this->tempStore = $temp_store->get('announcements_feed');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.