os2web / os2web_datalookup
Provides integration with Danish data lookup services such as Service platformen or Datafordeler.
Installs: 10 139
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 11
Forks: 1
Open Issues: 4
Type:drupal-module
Requires
- ext-soap: *
- 8.x-dev
- 1.11.5
- 1.11.4
- 1.11.3
- 1.11.2
- 1.11.1
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.2.1
- 1.0.2
- 1.0.1
- 1.0
- dev-f/OS2FORMS-359-cpr-lookup
- dev-datafordeler
- dev-f/CPRQueryService2.0
- dev-travis
- dev-f/BKDK-261
- dev-8.x-1.x
- dev-readme-improvements
- dev-sprint-3
- dev-OS2FORMS-290
This package is auto-updated.
Last update: 2024-11-02 08:02:15 UTC
README
Install
OS2Web Data lookup provides integration with Danish data lookup services such as Service platformen or Datafordeler. Module is available to download via composer.
composer require os2web/os2web_datalookup
drush en os2web_datalookup
Update
Updating process for OS2Web Data lookup module is similar to usual Drupal 8 module. Use Composer's built-in command for listing packages that have updates available:
composer outdated os2web/os2web_datalookup
Automated testing and code quality
See OS2Web testing and CI information
Contribution
Project is opened for new features and os course bugfixes. If you have any suggestion or you found a bug in project, you are very welcome to create an issue in github repository issue tracker. For issue description there is expected that you will provide clear and sufficient information about your feature request or bug report.
Code review policy
Git name convention
See OS2Web git name convention
Using services in other modules
// CVR lookup
/** @var \Drupal\os2web_datalookup\Plugin\DataLookupManager $pluginManager */
$pluginManager = \Drupal::service('plugin.manager.os2web_datalookup');
/** @var \Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DataLookupInterfaceCompany $cvrPlugin */
$cvrPlugin = $pluginManager->createDefaultInstanceByGroup('cvr_lookup');
if ($cvrPlugin->isReady()) {
$cvrResult = $cvrPlugin->lookup($cvr);
}
// CPR lookup.
/** @var \Drupal\os2web_datalookup\Plugin\DataLookupManager $pluginManager */
$pluginManager = \Drupal::service('plugin.manager.os2web_datalookup');
/** @var \Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DataLookupInterfaceCpr $cprPlugin */
$cprPlugin = $pluginManager->createDefaultInstanceByGroup('cpr_lookup');
if ($cprPlugin->isReady()) {
$cprResult = $cprPlugin->lookup($cpr);
}
// CVR lookup - DEPRECATED.
\Drupal::service('plugin.manager.os2web_datalookup')->createInstance('serviceplatformen_cvr')->getLegalUnit('[CVR number]')
// CPP lookup - DEPRECATED.
\Drupal::service('plugin.manager.os2web_datalookup')->createInstance('serviceplatformen_cpr')->cprBasicInformation('[CPR number]'))
New services/features
Datafordeler integration (https://datafordeler.dk)
In scope of os2forms project already implemented light integration with Danmarks Adresseregister (DAR) via fetching data for form elements autocomplete. See os2forms_dawa submodule
As soon as it is clear how the integration is going to be used, then os2forms_dawa will be refactored to OS2Web Data lookup plugin plugin.
Important notes
Serviceplatformen plugins
Settings for CPR and CVR serviceplantormen plugins are storing as configuration
in db and will(could) be exported as yml
file via Drupal configuration
management system. And afterwards could be tracked by git
.
If case you have public access to your git repository all setting from plugins will be exposed for third persons.
To avoid/prevent this behavior we recommend use Config ignore
module, where
you can add all settings you do not want to export/import via configuration
management system.