You are here

public function DataService::__construct in Weather 8

Same name and namespace in other branches
  1. 2.0.x src/Service/DataService.php \Drupal\weather\Service\DataService::__construct()

DataService constructor.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity type manager service.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/Service/DataService.php, line 46

Class

DataService
DataService service.

Namespace

Drupal\weather\Service

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager) {
  $this->entityTypeManager = $entity_type_manager;
  $this->placeStorage = $entity_type_manager
    ->getStorage('weather_place');
  $this->batchBuilder = new BatchBuilder();
}