You are here

public function SettingsForm::__construct in Weather 8

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

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

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.

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

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

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

Overrides ConfigFormBase::__construct

File

src/Form/SettingsForm.php, line 61

Class

SettingsForm
Configure Weather settings for this site.

Namespace

Drupal\weather\Form

Code

public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entityTypeManager, DataService $weatherDataService) {
  parent::__construct($config_factory);
  $this->entityTypeManager = $entityTypeManager;
  $this->weatherDisplayStorage = $entityTypeManager
    ->getStorage('weather_display');
  $this->weatherDisplayPlaceStorage = $entityTypeManager
    ->getStorage('weather_display_place');
  $this->weatherDataService = $weatherDataService;
}