diff --git a/phpinsights.php b/phpinsights.php deleted file mode 120000 index 97566a4..0000000 --- a/phpinsights.php +++ /dev/null @@ -1 +0,0 @@ -vendor/richcongress/static-analysis/configs/phpinsights.php \ No newline at end of file diff --git a/phpinsights.php b/phpinsights.php new file mode 100644 index 0000000..329986d --- /dev/null +++ b/phpinsights.php @@ -0,0 +1,9 @@ +arrayNode('modal')->children(); $modalNode->scalarNode('header')->isRequired(); + $modalNode->scalarNode('headerWithoutConsent')->isRequired(); $relatedCompaniesPrivacyPolicyUrlNode = $modalNode->arrayNode('related_companies_privacy_policy_url'); self::addUrlOrRouteConfig($relatedCompaniesPrivacyPolicyUrlNode); diff --git a/src/Resources/views/partials/_modal.html.twig b/src/Resources/views/partials/_modal.html.twig index 874ed7c..47e1505 100644 --- a/src/Resources/views/partials/_modal.html.twig +++ b/src/Resources/views/partials/_modal.html.twig @@ -2,6 +2,7 @@ { header: '{{ config.header|trans|e('js') }}', + headerWithoutConsent: '{{ config.headerWithoutConsent|trans|e('js') }}', relatedCompaniesCount: {{ getCookiesRegulationRelatedCompaniesCount() }}, relatedCompaniesPrivacyPolicyUrl: '{{ urlMacro.parse(config.related_companies_privacy_policy_url)|trim }}', } diff --git a/tests/DependencyConfiguration/ConfigurationTest.php b/tests/DependencyConfiguration/ConfigurationTest.php index c5c075c..223e4e6 100644 --- a/tests/DependencyConfiguration/ConfigurationTest.php +++ b/tests/DependencyConfiguration/ConfigurationTest.php @@ -44,6 +44,7 @@ public function testInstantiationContainer(): void ], 'modal' => [ 'header' => 'Modal header', + 'headerWithoutConsent' => 'Modal headerWithoutConsent', 'related_companies_privacy_policy_url' => [ 'absolute' => 'http://related_companies_privacy_policy', ], diff --git a/tests/Resources/Kernel/config/packages/rich_id_cookies_regulation.yaml b/tests/Resources/Kernel/config/packages/rich_id_cookies_regulation.yaml index 201983e..2d01402 100644 --- a/tests/Resources/Kernel/config/packages/rich_id_cookies_regulation.yaml +++ b/tests/Resources/Kernel/config/packages/rich_id_cookies_regulation.yaml @@ -5,6 +5,7 @@ rich_id_cookies_regulation: url: 'http://privacy_policy' modal: header: 'Modal header' + headerWithoutConsent: 'Modal headerWithoutConsent' related_companies_privacy_policy_url: 'http://related_companies_privacy_policy' services: google_tag_manager: diff --git a/tests/TwigExtension/CookiesRegulationTwigExtensionTest.php b/tests/TwigExtension/CookiesRegulationTwigExtensionTest.php index 74f14b9..3788804 100644 --- a/tests/TwigExtension/CookiesRegulationTwigExtensionTest.php +++ b/tests/TwigExtension/CookiesRegulationTwigExtensionTest.php @@ -43,6 +43,7 @@ public function testGetConfig(): void ], 'modal' => [ 'header' => 'Modal header', + 'headerWithoutConsent' => 'Modal headerWithoutConsent', 'related_companies_privacy_policy_url' => [ 'absolute' => 'http://related_companies_privacy_policy', ],