public function WeatherDisplayForm::__construct in Weather 2.0.x
Same name and namespace in other branches
- 8 src/Form/WeatherDisplayForm.php \Drupal\weather\Form\WeatherDisplayForm::__construct()
WeatherDisplayForm constructor.
Parameters
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository service.
\Drupal\weather\Service\HelperService $weatherHelperService: Weather helper service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity Type manager service.
\Drupal\Core\Entity\EntityTypeBundleInfoInterface|null $entity_type_bundle_info: The entity type bundle service.
\Drupal\Component\Datetime\TimeInterface|null $time: The time service.
\Drupal\Core\Block\BlockManagerInterface $block_manager: The block manager.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
Overrides ContentEntityForm::__construct
File
- src/
Form/ WeatherDisplayForm.php, line 65
Class
- WeatherDisplayForm
- Form controller for the weather_display entity edit forms.
Namespace
Drupal\weather\FormCode
public function __construct(EntityRepositoryInterface $entity_repository, HelperService $weatherHelperService, EntityTypeManagerInterface $entityTypeManager, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, BlockManagerInterface $block_manager) {
parent::__construct($entity_repository, $entity_type_bundle_info, $time);
$this->weatherHelperService = $weatherHelperService;
$this->weatherDisplayStorage = $entityTypeManager
->getStorage('weather_display');
$this->blockManager = $block_manager;
}