You are here

public function OpenlayersLayerFormBase::__construct in Openlayers 8.4

Construct the LayerFormBase.

For simple entity forms, there's no need for a constructor. Our openlayers_layer form base, however, requires an entity query factory to be injected into it from the container. We later use this query factory to build an entity query for the exists() method.

Parameters

\Drupal\Core\Entity\EntityStorageInterface $entity_storage: An entity query factory for the openlayers_layer entity type.

File

src/Form/OpenlayersLayerFormBase.php, line 41

Class

OpenlayersLayerFormBase
Class OpenlayersLayerFormBase.

Namespace

Drupal\openlayers\Form

Code

public function __construct(EntityStorageInterface $entity_storage) {
  $this->entityStorage = $entity_storage;
}