Skip to content

Commit bb23295

Browse files
committed
OS2FORMS-359 automatic switch to another plugin
1 parent daaf3da commit bb23295

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Plugin/DataLookupManager.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,17 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac
5555
* {@inheritdoc}
5656
*/
5757
public function createInstance($plugin_id, array $configuration = []) {
58+
// Hard switch to another plugin fallback - see
59+
// https://os2web.atlassian.net/browse/OS2FORMS-359.
60+
if ($plugin_id == 'serviceplatformen_cpr') {
61+
\Drupal::logger('os2web_datalookup')->warning('"Serviceplatformen CPR (SF6008)" is obsolete and will be phased out. Automatically switched to "Serviceplatformen CPR - extended (SF1520)"');
62+
$plugin_id = 'serviceplatformen_cpr_extended';
63+
}
64+
5865
if (empty($configuration)) {
5966
$configuration = $this->configFactory->get(DataLookupPluginSettingsForm::getConfigName() . '.' . $plugin_id)->get();
6067
}
68+
6169
return parent::createInstance($plugin_id, $configuration);
6270
}
6371

0 commit comments

Comments
 (0)