You are here

public function HelperService::__construct in Weather 2.0.x

Same name and namespace in other branches
  1. 8 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
Some small helper functions.

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');
}