public function ParserService::__construct in Weather 8
Same name and namespace in other branches
- 2.0.x src/Service/ParserService.php \Drupal\weather\Service\ParserService::__construct()
ParserService constructor.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity type manager.
\Drupal\weather\Service\HelperService $weatherHelper: Weather helper service.
\GuzzleHttp\Client $httpClient: Http client.
\Drupal\Core\Logger\LoggerChannelFactoryInterface $loggerFactory: Logger service.
\Drupal\Core\Session\AccountProxyInterface $current_user: Current user object.
\Drupal\Core\Messenger\MessengerInterface $messenger: Drupal messenegr service.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- src/
Service/ ParserService.php, line 103
Class
- ParserService
- ParserService service.
Namespace
Drupal\weather\ServiceCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, HelperService $weatherHelper, Client $httpClient, LoggerChannelFactoryInterface $loggerFactory, AccountProxyInterface $current_user, MessengerInterface $messenger) {
$this->entityTypeManager = $entity_type_manager;
$this->weatherHelper = $weatherHelper;
$this->httpClient = $httpClient;
$this->logger = $loggerFactory;
$this->currentUser = $current_user;
$this->messenger = $messenger;
$this->weatherForecastInfoStorage = $entity_type_manager
->getStorage('weather_forecast_information');
$this->weatherForecastStorage = $entity_type_manager
->getStorage('weather_forecast');
$this->weatherPlaceStorage = $entity_type_manager
->getStorage('weather_place');
}