From c84a48c71efebfea2d759692ec2f79bd73c2001d Mon Sep 17 00:00:00 2001 From: Stanislav Kutasevits Date: Fri, 15 May 2026 17:03:41 +0300 Subject: [PATCH 1/2] OS-244 #246 Adding Datafordeler address lookup --- CHANGELOG.md | 2 + .../os2forms_dawa/os2forms_dawa.services.yml | 4 - .../src/Controller/DawaElementController.php | 32 +-- .../Element/DawaElementAddressMatrikula.php | 17 +- .../src/Element/DawaElementBase.php | 26 +-- .../os2forms_dawa/src/Entity/DawaAddress.php | 135 ----------- .../WebformElement/DawaElementAddress.php | 6 +- .../WebformElement/DawaElementBlock.php | 4 +- .../WebformElement/DawaElementMatrikula.php | 4 +- .../DataLookup/DatafordelerDataLookup.php | 162 ------------- .../DatafordelerDataLookupInterface.php | 38 --- .../os2forms_dawa/src/Service/DawaService.php | 219 ------------------ 12 files changed, 39 insertions(+), 610 deletions(-) delete mode 100644 modules/os2forms_dawa/os2forms_dawa.services.yml delete mode 100644 modules/os2forms_dawa/src/Entity/DawaAddress.php delete mode 100644 modules/os2forms_dawa/src/Plugin/os2web/DataLookup/DatafordelerDataLookup.php delete mode 100644 modules/os2forms_dawa/src/Plugin/os2web/DataLookup/DatafordelerDataLookupInterface.php delete mode 100644 modules/os2forms_dawa/src/Service/DawaService.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f722099..3bd280b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa - git actions check - [PR-289](https://github.com/OS2Forms/os2forms/pull/289) Added required "Zoom control position" to map element +- [#246](https://github.com/OS2Forms/os2forms/issues/246) + Adding Datafordeler address lookup ## [5.0.0] 2025-11-18 diff --git a/modules/os2forms_dawa/os2forms_dawa.services.yml b/modules/os2forms_dawa/os2forms_dawa.services.yml deleted file mode 100644 index c8c63c95..00000000 --- a/modules/os2forms_dawa/os2forms_dawa.services.yml +++ /dev/null @@ -1,4 +0,0 @@ -services: - os2forms_dawa.service: - class: Drupal\os2forms_dawa\Service\DawaService - arguments: ['@plugin.manager.os2web_datalookup'] diff --git a/modules/os2forms_dawa/src/Controller/DawaElementController.php b/modules/os2forms_dawa/src/Controller/DawaElementController.php index 93787e68..5f513686 100644 --- a/modules/os2forms_dawa/src/Controller/DawaElementController.php +++ b/modules/os2forms_dawa/src/Controller/DawaElementController.php @@ -3,7 +3,7 @@ namespace Drupal\os2forms_dawa\Controller; use Drupal\Core\Controller\ControllerBase; -use Drupal\os2forms_dawa\Service\DawaService; +use Drupal\os2web_datalookup\Plugin\DataLookupManager; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; @@ -14,20 +14,20 @@ class DawaElementController extends ControllerBase { /** - * The DAWA service object. + * Datafordeler address lookup. * - * @var \Drupal\os2forms_dawa\Service\DawaService + * @var \Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DatafordelerAddressLookupInterface */ - protected $dawaService; + protected $datafordelerAddressLookup; /** * Constructs a DawaElementController object. * - * @param \Drupal\os2forms_dawa\Service\DawaService $os2forms_dawa_service - * The DAWA service object. + * @param \Drupal\os2web_datalookup\Plugin\DataLookupManager $dataLookupManager + * Datalookup manager. */ - public function __construct(DawaService $os2forms_dawa_service) { - $this->dawaService = $os2forms_dawa_service; + public function __construct(DataLookupManager $dataLookupManager) { + $this->datafordelerAddressLookup = $dataLookupManager->createInstance('datafordeler_address_lookup'); } /** @@ -35,7 +35,7 @@ public function __construct(DawaService $os2forms_dawa_service) { */ public static function create(ContainerInterface $container) { return new static( - $container->get('os2forms_dawa.service') + $container->get('plugin.manager.os2web_datalookup') ); } @@ -61,18 +61,8 @@ public function autocomplete(Request $request, $element_type) { $matches = []; // Get the matches based on the element type. - switch ($element_type) { - case 'os2forms_dawa_address': - $matches = $this->dawaService->getAddressMatches($query); - break; - - case 'os2forms_dawa_block': - $matches = $this->dawaService->getBlockMatches($query); - break; - - case 'os2forms_dawa_matrikula': - $matches = $this->dawaService->getMatrikulaMatches($query); - break; + if ($element_type == 'os2forms_dawa_address') { + $matches = $this->datafordelerAddressLookup->getAddressMatches($query); } return new JsonResponse($matches); diff --git a/modules/os2forms_dawa/src/Element/DawaElementAddressMatrikula.php b/modules/os2forms_dawa/src/Element/DawaElementAddressMatrikula.php index fdfc0ea9..d3df890e 100644 --- a/modules/os2forms_dawa/src/Element/DawaElementAddressMatrikula.php +++ b/modules/os2forms_dawa/src/Element/DawaElementAddressMatrikula.php @@ -96,11 +96,14 @@ public static function getCompositeElements(array $element) { private static function getMatrikulaOptions($addressValue, array $element) { $options = []; - /** @var \Drupal\os2forms_dawa\Service\DawaService $dawaService */ - $dawaService = \Drupal::service('os2forms_dawa.service'); + /** @var \Drupal\os2web_datalookup\Plugin\DataLookupManager $datalookupManager */ + $datalookupManager = \Drupal::service('plugin.manager.os2web_datalookup'); - /** @var \Drupal\os2forms_dawa\Plugin\os2web\DataLookup\DatafordelerDataLookupInterface $datafordelerLookup */ - $datafordelerLookup = \Drupal::service('plugin.manager.os2web_datalookup')->createInstance('datafordeler_data_lookup'); + /** @var \Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DatafordelerAddressLookupInterface $addressLookup */ + $addressLookup = $datalookupManager->createInstance('datafordeler_address_lookup'); + + /** @var \Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DatafordelerMartikulaLookupInterface $matrikulaLookup */ + $matrikulaLookup = $datalookupManager->createInstance('datafordeler_matrikula_lookup'); // Getting address. $addressParams = new ParameterBag(); @@ -108,17 +111,17 @@ private static function getMatrikulaOptions($addressValue, array $element) { if (isset($element['#limit_by_municipality'])) { $addressParams->set('limit_by_municipality', $element['#limit_by_municipality']); } - $address = $dawaService->getSingleAddress($addressParams); + $address = $addressLookup->getSingleAddress($addressParams); if ($address) { $addressAccessId = $address->getAccessAddressId(); // Find matrikula list from the houseid (husnummer): - $matrikulaId = $datafordelerLookup->getMatrikulaId($addressAccessId); + $matrikulaId = $matrikulaLookup->getMatrikulaId($addressAccessId); // Find Matrikula entries from matrikulas ID. if ($matrikulaId) { - $matrikulaEnties = $datafordelerLookup->getMatrikulaEntries($matrikulaId); + $matrikulaEnties = $matrikulaLookup->getMatrikulaEntries($matrikulaId); foreach ($matrikulaEnties as $matrikula) { $matrikulaOption = $matrikula->getMatrikulaNumber() . ' ' . $matrikula->getOwnershipName(); diff --git a/modules/os2forms_dawa/src/Element/DawaElementBase.php b/modules/os2forms_dawa/src/Element/DawaElementBase.php index 6c723e47..ee632546 100644 --- a/modules/os2forms_dawa/src/Element/DawaElementBase.php +++ b/modules/os2forms_dawa/src/Element/DawaElementBase.php @@ -4,6 +4,7 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element\Textfield; +use Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DatafordelerAddressLookupInterface; use Symfony\Component\HttpFoundation\ParameterBag; /** @@ -34,26 +35,17 @@ public static function validateDawaElementBase(&$element, FormStateInterface $fo } if (!empty($value)) { - /** @var \Drupal\os2forms_dawa\Service\DawaService $dawaService*/ - $dawaService = \Drupal::service('os2forms_dawa.service'); + $matches = []; - $element_type = $element['#type']; - - $parameters = new ParameterBag($element['#autocomplete_route_parameters']); - $parameters->set('q', $value); + /** @var \Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DatafordelerAddressLookupInterface $datafordelerAddressLookup */ + $datafordelerAddressLookup = \Drupal::service('plugin.manager.os2web_datalookup')->createInstance('datafordeler_address_lookup'); - switch ($element_type) { - case 'os2forms_dawa_address': - $matches = $dawaService->getAddressMatches($parameters); - break; - - case 'os2forms_dawa_block': - $matches = $dawaService->getBlockMatches($parameters); - break; + $element_type = $element['#type']; - case 'os2forms_dawa_matrikula': - $matches = $dawaService->getMatrikulaMatches($parameters); - break; + if ($element_type == 'os2forms_dawa_address') { + $parameters = new ParameterBag($element['#autocomplete_route_parameters']); + $parameters->set('q', $value); + $matches = $datafordelerAddressLookup->getAddressMatches($parameters); } // Checking if the current value is within the list of the values from an diff --git a/modules/os2forms_dawa/src/Entity/DawaAddress.php b/modules/os2forms_dawa/src/Entity/DawaAddress.php deleted file mode 100644 index 89fe92a7..00000000 --- a/modules/os2forms_dawa/src/Entity/DawaAddress.php +++ /dev/null @@ -1,135 +0,0 @@ -id = $json['id']; - - if (isset($json['adgangsadresse']) && is_array($json['adgangsadresse'])) { - $this->municipalityCode = $json['adgangsadresse']['kommune']['kode']; - $this->propertyNumber = $json['adgangsadresse']['esrejendomsnr']; - $this->longitude = $json['adgangsadresse']['adgangspunkt']['koordinater'][0]; - $this->latitude = $json['adgangsadresse']['adgangspunkt']['koordinater'][1]; - $this->accessAddressId = $json['adgangsadresse']['id']; - } - } - - /** - * Gets address ID. - * - * @return string - * ID of the address. - */ - public function id() { - return $this->id; - } - - /** - * Gets municipality code. - * - * @return string - * Municipality code of the address. - */ - public function getMunicipalityCode() { - return $this->municipalityCode; - } - - /** - * Gets property number. - * - * @return string - * property number of the address. - */ - public function getPropertyNumber() { - return $this->propertyNumber; - } - - /** - * Gets latitude. - * - * @return float - * property latitude. - */ - public function getLatitude() { - return $this->latitude; - } - - /** - * Gets longitude. - * - * @return float - * property longitude. - */ - public function getLongitude() { - return $this->longitude; - } - - /** - * Gets Address access ID. - * - * @return string - * Address access ID. - */ - public function getAccessAddressId() { - return $this->accessAddressId; - } - -} diff --git a/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementAddress.php b/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementAddress.php index 93f809da..ef724bd9 100644 --- a/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementAddress.php +++ b/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementAddress.php @@ -51,9 +51,9 @@ public function form(array $form, FormStateInterface $form_state) { ]; $form['autocomplete']['limit_by_municipality'] = [ '#type' => 'textfield', - '#title' => $this->t('Limit by municipality (-es)'), - '#pattern' => '^(\d{3},?)*$', - '#description' => $this->t('CSV list of municipalities codes, what will limit the address lookup.'), + '#title' => $this->t('Limit by municipality'), + '#pattern' => '^(\d{4})$', + '#description' => $this->t('Municipatity code, what will limit the address lookup. Single number, 4 digits, e.g. 0661'), ]; return $form; diff --git a/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementBlock.php b/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementBlock.php index cb0b832f..45a20502 100644 --- a/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementBlock.php +++ b/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementBlock.php @@ -10,8 +10,8 @@ * * @WebformElement( * id = "os2forms_dawa_block", - * label = @Translation("DAWA Block (autocomplete)"), - * description = @Translation("Provides a DAWA Block Autocomplete element."), + * label = @Translation("DAWA Block (autocomplete) - DEPRECATED"), + * description = @Translation("Provides a DAWA Block Autocomplete element. This element is deprecated due to the API being phased out. There is no provided alternative for this element."), * category = @Translation("DAWA"), * ) */ diff --git a/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementMatrikula.php b/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementMatrikula.php index 34654769..464a45aa 100644 --- a/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementMatrikula.php +++ b/modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementMatrikula.php @@ -10,8 +10,8 @@ * * @WebformElement( * id = "os2forms_dawa_matrikula", - * label = @Translation("DAWA Matrikula (autocomplete)"), - * description = @Translation("Provides a DAWA Matrikula Autocomplete element."), + * label = @Translation("DAWA Matrikula (autocomplete) - DEPRECATED"), + * description = @Translation("Provides a DAWA Matrikula Autocomplete element. This element is deprecated due to the API being phased out. There is no provided alternative for this element."), * category = @Translation("DAWA"), * ) */ diff --git a/modules/os2forms_dawa/src/Plugin/os2web/DataLookup/DatafordelerDataLookup.php b/modules/os2forms_dawa/src/Plugin/os2web/DataLookup/DatafordelerDataLookup.php deleted file mode 100644 index 00df83a3..00000000 --- a/modules/os2forms_dawa/src/Plugin/os2web/DataLookup/DatafordelerDataLookup.php +++ /dev/null @@ -1,162 +0,0 @@ -get('os2web_audit.logger'); - /** @var \Drupal\key\KeyRepositoryInterface $keyRepository */ - $keyRepository = $container->get('key.repository'); - /** @var \Drupal\Core\File\FileSystem $fileSystem */ - $fileSystem = $container->get('file_system'); - - return new static( - $configuration, - $plugin_id, - $plugin_definition, - $container->get('http_client'), - $auditLogger, - $keyRepository, - $fileSystem, - ); - } - - /** - * {@inheritdoc} - */ - public function getMatrikulaId(string $addressAccessId) : ?string { - $url = "https://services.datafordeler.dk/DAR/DAR/3.0.0/rest/husnummerTilJordstykke"; - - $json = $this->httpClient->request('GET', $url, [ - 'query' => [ - 'husnummerid' => $addressAccessId, - ], - ])->getBody(); - - $jsonDecoded = json_decode($json, TRUE); - if (is_array($jsonDecoded)) { - if (NestedArray::keyExists($jsonDecoded, ['gældendeJordstykke', 'jordstykkeLokalId'])) { - return NestedArray::getValue($jsonDecoded, ['gældendeJordstykke', 'jordstykkeLokalId']); - } - } - - return NULL; - } - - /** - * {@inheritdoc} - */ - public function getMatrikulaEntries(string $matrikulaId) : array { - $matrikulaEntries = []; - $url = "https://services.datafordeler.dk/Matriklen2/Matrikel/2.0.0/rest/SamletFastEjendom"; - - $configuration = $this->getConfiguration(); - $json = $this->httpClient->request('GET', $url, [ - 'query' => [ - 'jordstykkeid' => $matrikulaId, - 'username' => $configuration['username'], - 'password' => $configuration['password'], - ], - ])->getBody(); - - $jsonDecoded = json_decode($json, TRUE); - - if (is_array($jsonDecoded)) { - if (NestedArray::keyExists($jsonDecoded, ['features', 0, 'properties', 'jordstykke'])) { - $jordstykker = NestedArray::getValue($jsonDecoded, ['features', 0, 'properties', 'jordstykke']); - foreach ($jordstykker as $jordstyk) { - try { - $matrikulaEntries[] = new DatafordelerMatrikula($jordstyk); - } - catch (\TypeError $e) { - // Could not create matrikula object. - } - } - } - } - - return $matrikulaEntries; - } - - /** - * {@inheritdoc} - */ - public function defaultConfiguration(): array { - return [ - 'username' => '', - 'password' => '', - ] + parent::defaultConfiguration(); - } - - /** - * {@inheritdoc} - */ - public function buildConfigurationForm(array $form, FormStateInterface $form_state) { - $form['username'] = [ - '#type' => 'textfield', - '#title' => $this->t('Username for service calls'), - '#default_value' => $this->configuration['username'], - '#required' => TRUE, - '#description' => $this->t('Username required for performing API requests'), - ]; - $form['password'] = [ - '#type' => 'textfield', - '#title' => $this->t('Password for service calls'), - '#default_value' => $this->configuration['password'], - '#required' => TRUE, - '#description' => $this->t('Password required for performing API requests'), - ]; - - return $form; - } - - /** - * {@inheritdoc} - */ - public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { - $configuration = $this->getConfiguration(); - $configuration['username'] = $form_state->getValue('username'); - $configuration['password'] = $form_state->getValue('password'); - $this->setConfiguration($configuration); - } - -} diff --git a/modules/os2forms_dawa/src/Plugin/os2web/DataLookup/DatafordelerDataLookupInterface.php b/modules/os2forms_dawa/src/Plugin/os2web/DataLookup/DatafordelerDataLookupInterface.php deleted file mode 100644 index 16947249..00000000 --- a/modules/os2forms_dawa/src/Plugin/os2web/DataLookup/DatafordelerDataLookupInterface.php +++ /dev/null @@ -1,38 +0,0 @@ -dawaDataLookup = $manager->createInstance('dawa_data_lookup'); - } - - /** - * Returns response for 'os2forms_dawa_address' element autocomplete route. - * - * @param \Symfony\Component\HttpFoundation\ParameterBag $params - * The query params. - * @param string $fetchColumn - * The name of the column to return, set to NULL to get all columns. - * - * @return array - * Array of matches. - */ - public function getAddressMatches(ParameterBag $params, $fetchColumn = 'tekst') { - // Get autocomplete query. - $q = $params->get('q') ?: ''; - - $matches = []; - - $autocompletePath = $this->dawaDataLookup->getAddressAutocompletePath(); - $requestUrl = $autocompletePath . '?q=' . urlencode($q); - - // Adding limit by municipality limit, if present. - $limitByMunicipality = $params->get('limit_by_municipality') ?: ''; - if (!empty($limitByMunicipality)) { - $limit_by_municipality_arr = str_getcsv($limitByMunicipality); - $requestUrl .= '&kommunekode=' . implode('|', $limit_by_municipality_arr); - } - - $json = file_get_contents($requestUrl); - $jsonDecoded = json_decode($json, TRUE); - - if ($fetchColumn) { - if (is_array($jsonDecoded)) { - // Checking if remove_place_name is enabled. - $removePlaceName = $params->get('remove_place_name') ?: ''; - if ($removePlaceName) { - foreach ($jsonDecoded as $entry) { - $supplerendebynavn = $entry['adresse']['supplerendebynavn']; - - $text = $entry[$fetchColumn]; - if (!empty($supplerendebynavn)) { - $text = preg_replace("/$supplerendebynavn,/", '', $text); - } - - $matches[] = $text; - } - } - else { - $matches = array_column($jsonDecoded, $fetchColumn); - } - } - } - else { - $matches = $jsonDecoded; - } - - return $matches; - } - - /** - * Returns single address from address API. - * - * @param \Symfony\Component\HttpFoundation\ParameterBag $params - * The query params. - * - * @return \Drupal\os2forms_dawa\Entity\DawaAddress|null - * The found address. - */ - public function getSingleAddress(ParameterBag $params) { - $address = NULL; - - // Getting address_id. - $matches = $this->getAddressMatches($params, NULL); - if (!empty($matches) && isset($matches[0]['adresse'])) { - $address = new DawaAddress($matches[0]['adresse']); - } - - // Fetching address. - if ($address && $address->id()) { - $requestUrl = $this->dawaDataLookup->getAddressApiPath() . '/' . $address->id(); - - $json = file_get_contents($requestUrl); - $jsonDecoded = json_decode($json, TRUE); - - if (is_array($jsonDecoded) && !empty($jsonDecoded)) { - $address = new DawaAddress($jsonDecoded); - } - } - - return $address; - } - - /** - * Returns response for 'os2forms_dawa_block' element autocomplete route. - * - * @param \Symfony\Component\HttpFoundation\ParameterBag $params - * The query params. - * - * @return array - * Array of matches. - */ - public function getBlockMatches(ParameterBag $params) { - // Get autocomplete query. - $q = $params->get('q') ?: ''; - - $matches = []; - - $autocompletePath = $this->dawaDataLookup->getBlockAutocompletePath(); - $requestUrl = $autocompletePath . '?q=' . urlencode($q); - - $json = file_get_contents($requestUrl); - $jsonDecoded = json_decode($json, TRUE); - if (is_array($jsonDecoded)) { - // Checking if remove_code is enabled. - $removeCode = $params->get('remove_code') ?: ''; - if ($removeCode) { - foreach ($jsonDecoded as $entry) { - $code = $entry['ejerlav']['kode']; - - $text = $entry['tekst']; - if (!empty($code)) { - $text = preg_replace("/$code /", '', $text); - } - - $matches[] = $text; - } - } - else { - $matches = array_column($jsonDecoded, 'tekst'); - } - } - - return $matches; - } - - /** - * Returns response for 'os2forms_dawa_matrikula' element autocomplete route. - * - * @param \Symfony\Component\HttpFoundation\ParameterBag $params - * The query params. - * - * @return array - * Array of matches. - */ - public function getMatrikulaMatches(ParameterBag $params) { - // Get autocomplete query. - $q = $params->get('q') ?: ''; - - $matches = []; - - $autocompletePath = $this->dawaDataLookup->getMatrikulaAutocompletePath(); - $requestUrl = $autocompletePath . '?q=' . urlencode($q); - - // Adding limit by municipality limit, if present. - $limitByMunicipality = $params->get('limit_by_municipality') ?: ''; - if (!empty($limitByMunicipality)) { - $requestUrl .= '&kommunekode=' . $limitByMunicipality; - } - - // Adding property number, if present. - $limitByProperty = $params->get('limit_by_property') ?: ''; - if (!empty($limitByProperty)) { - $requestUrl .= '&esrejendomsnr=' . $limitByProperty; - } - - $json = file_get_contents($requestUrl); - $jsonDecoded = json_decode($json, TRUE); - if (is_array($jsonDecoded)) { - // Checking if remove_code is enabled. - $removeCode = $params->get('remove_code') ?: ''; - if ($removeCode) { - foreach ($jsonDecoded as $entry) { - $code = $entry['jordstykke']['ejerlav']['kode']; - - $text = $entry['tekst']; - if (!empty($code)) { - $text = preg_replace("/ \($code\)/", '', $text); - } - - $matches[] = $text; - } - } - else { - $matches = array_column($jsonDecoded, 'tekst'); - } - } - - return $matches; - } - -} From e048f47f943cb2ccd942683915d16f2723ff63b6 Mon Sep 17 00:00:00 2001 From: Stanislav Kutasevits Date: Fri, 15 May 2026 17:06:11 +0300 Subject: [PATCH 2/2] OS-244 #246 fixing phpcs --- modules/os2forms_dawa/src/Element/DawaElementBase.php | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/os2forms_dawa/src/Element/DawaElementBase.php b/modules/os2forms_dawa/src/Element/DawaElementBase.php index ee632546..0a519540 100644 --- a/modules/os2forms_dawa/src/Element/DawaElementBase.php +++ b/modules/os2forms_dawa/src/Element/DawaElementBase.php @@ -4,7 +4,6 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element\Textfield; -use Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DatafordelerAddressLookupInterface; use Symfony\Component\HttpFoundation\ParameterBag; /**