You are here

public function HelperService::__construct in Weather 8

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

HelperService 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/HelperService.php, line 50

Class

HelperService
HelperService service.

Namespace

Drupal\weather\Service

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager) {
  $this->entityTypeManager = $entity_type_manager;
  $this->weatherDisplayStorage = $entity_type_manager
    ->getStorage('weather_display');
  $this->weatherDisplayPlaceStorage = $entity_type_manager
    ->getStorage('weather_display_place');
  $this->weatherPlaceStorage = $entity_type_manager
    ->getStorage('weather_place');
}