You are here

public function AddCustomPlaceForm::__construct in Weather 8

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

Constructs a \Drupal\weather\Form\SettingsForm object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity type manager storage.

\Drupal\weather\Service\DataService $weatherDataService: Weather data service.

\Drupal\weather\Service\HelperService $helperService: Weather helper service.

\Drupal\weather\Service\ParserService $parserService: Weather parser service.

\Drupal\Core\Messenger\MessengerInterface $messenger: Drupal messenegr service.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/Form/AddCustomPlaceForm.php, line 80

Class

AddCustomPlaceForm
Configure Weather settings for this site.

Namespace

Drupal\weather\Form

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, DataService $weatherDataService, HelperService $helperService, ParserService $parserService, MessengerInterface $messenger) {
  $this->entityTypeManager = $entityTypeManager;
  $this->weatherDisplayStorage = $entityTypeManager
    ->getStorage('weather_display');
  $this->weatherDisplayPlaceStorage = $entityTypeManager
    ->getStorage('weather_display_place');
  $this->weatherDataService = $weatherDataService;
  $this->weatherHelper = $helperService;
  $this->weatherParser = $parserService;
  $this->messenger = $messenger;
}