1
1
# OS2Web Data lookup [ ![ Build Status] ( https://travis-ci.org/OS2web/os2web_datalookup.svg?branch=8.x )] ( https://travis-ci.org/OS2web/os2web_datalookup )
2
+
2
3
## Install
3
4
4
- OS2Web Data lookup provides integration with Danish data lookup services such as Service platformen or Datafordeler.
5
- Module is available to download via composer.
6
- ```
5
+ OS2Web Data lookup provides integration with Danish data lookup services such as
6
+ Service platformen or Datafordeler. Module is available to download via
7
+ composer.
8
+
9
+ ``` shell
7
10
composer require os2web/os2web_datalookup
8
11
drush en os2web_datalookup
9
12
```
10
13
11
14
## Update
12
- Updating process for OS2Web Data lookup module is similar to usual Drupal 8 module.
13
- Use Composer's built-in command for listing packages that have updates available:
14
15
15
- ```
16
+ Updating process for OS2Web Data lookup module is similar to the usual Drupal 8
17
+ module. Use Composer's built-in command for listing packages that have updates
18
+ available:
19
+
20
+ ``` shell
16
21
composer outdated os2web/os2web_datalookup
17
22
```
18
23
19
24
## Automated testing and code quality
25
+
20
26
See [ OS2Web testing and CI information] ( https://github.com/OS2Web/docs#testing-and-ci )
21
27
22
28
## Contribution
23
29
24
30
Project is opened for new features and os course bugfixes.
25
- If you have any suggestion or you found a bug in project, you are very welcome
26
- to create an issue in github repository issue tracker.
27
- For issue description there is expected that you will provide clear and
28
- sufficient information about your feature request or bug report.
31
+ If you have any suggestion, or you found a bug in project, you are very welcome
32
+ to create an issue in GitHub repository issue tracker. For issue description,
33
+ there is expected that you will provide clear and sufficient information about
34
+ your feature request or bug report.
29
35
30
36
### Code review policy
37
+
31
38
See [ OS2Web code review policy] ( https://github.com/OS2Web/docs#code-review )
32
39
33
40
### Git name convention
41
+
34
42
See [ OS2Web git name convention] ( https://github.com/OS2Web/docs#git-guideline )
35
43
36
44
### Using services in other modules
37
45
38
- ```
46
+ ``` php
39
47
// CVR lookup
40
48
/** @var \Drupal\os2web_datalookup\Plugin\DataLookupManager $pluginManager */
41
49
$pluginManager = \Drupal::service('plugin.manager.os2web_datalookup');
42
- /** @var \Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DataLookupInterfaceCompany $cvrPlugin */
50
+ /** @var \Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DataLookupCompanyInterface $cvrPlugin */
43
51
$cvrPlugin = $pluginManager->createDefaultInstanceByGroup('cvr_lookup');
44
52
45
53
if ($cvrPlugin->isReady()) {
@@ -49,7 +57,7 @@ if ($cvrPlugin->isReady()) {
49
57
// CPR lookup.
50
58
/** @var \Drupal\os2web_datalookup\Plugin\DataLookupManager $pluginManager */
51
59
$pluginManager = \Drupal::service('plugin.manager.os2web_datalookup');
52
- /** @var \Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DataLookupInterfaceCpr $cprPlugin */
60
+ /** @var \Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DataLookupCprInterface $cprPlugin */
53
61
$cprPlugin = $pluginManager->createDefaultInstanceByGroup('cpr_lookup');
54
62
55
63
if ($cprPlugin->isReady()) {
@@ -68,22 +76,25 @@ if ($cprPlugin->isReady()) {
68
76
69
77
### Datafordeler integration (https://datafordeler.dk)
70
78
71
- In scope of os2forms project already implemented light integration
72
- with Danmarks Adresseregister (DAR) via fetching data for form elements
73
- autocomplete. See [ os2forms_dawa submodule] ( https://github.com/OS2Forms/os2forms )
79
+ In the scope of os2forms project already implemented light integration with
80
+ Danmarks Adresseregister (DAR) via fetching data for form elements autocomplete.
81
+
82
+ See [ os2forms_dawa submodule] ( https://github.com/OS2Forms/os2forms )
74
83
75
84
As soon as it is clear how the integration is going to be used, then
76
- os2forms_dawa will be refactored to OS2Web Data lookup plugin plugin .
85
+ os2forms_dawa will be refactored to OS2Web Data lookup plugin.
77
86
78
87
## Important notes
88
+
79
89
### Serviceplatformen plugins
80
- Settings for CPR and CVR serviceplantormen plugins are storing as configuration
81
- in db and will(could) be exported as ` yml ` file via Drupal configuration
82
- management system. And afterwards could be tracked by ` git ` .
83
90
84
- If case you have public access to your git repository all setting from plugins
91
+ Settings for CPR and CVR serviceplatformen plugins are storing as configuration
92
+ in db and will(could) be exported as ` yml ` file via Drupal's configuration
93
+ management system. And afterward could be tracked by ` git ` .
94
+
95
+ If case you have public access to your git repository, all settings from plugins
85
96
will be exposed for third persons.
86
97
87
- To avoid/prevent this behavior we recommend use ` Config ignore ` module, where
88
- you can add all settings you do not want to export/import via configuration
98
+ To avoid/prevent this behavior, we recommend use ` Config ignore ` module, where
99
+ you can add all settings you do not want to export/import via the configuration
89
100
management system.
0 commit comments