diff --git a/Constant.php b/Constant.php
index 4218fb4..578e8ef 100644
--- a/Constant.php
+++ b/Constant.php
@@ -1,6 +1,7 @@
translator = $translator;
$this->router = $router;
$this->permissionApi = $permissionApi;
$this->variableApi = $variableApi;
}
- /**
- * get Links of any type for this extension
- * required by the interface.
- *
- * @param string $type
- *
- * @return array
- */
- public function getLinks($type = LinkContainerInterface::TYPE_ADMIN)
+ public function getLinks(string $type = LinkContainerInterface::TYPE_ADMIN): array
{
$method = 'get'.ucfirst(mb_strtolower($type));
if (method_exists($this, $method)) {
@@ -76,11 +65,9 @@ public function getLinks($type = LinkContainerInterface::TYPE_ADMIN)
}
/**
- * get the Admin links for this extension.
- *
- * @return array
+ * Get the admin links for this extension.
*/
- private function getAdmin()
+ private function getAdmin(): array
{
$links = [];
@@ -96,45 +83,43 @@ private function getAdmin()
}
/**
- * get the User links for this extension.
- *
- * @return array
+ * Get the user links for this extension.
*/
- private function getUser()
+ private function getUser(): array
{
$links = [];
- if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_LEGALNOTICE_ACTIVE, false)) {
+ if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_LEGALNOTICE_ACTIVE)) {
$links[] = [
'text' => $this->translator->__('Legal notice', 'zikulalegalmodule'),
'url' => $this->determineUrl(LegalConstant::MODVAR_LEGALNOTICE_URL, 'legalnotice'),
];
}
- if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_TERMS_ACTIVE, false)) {
+ if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_TERMS_ACTIVE)) {
$links[] = [
'text' => $this->translator->__('Terms of use', 'zikulalegalmodule'),
'url' => $this->determineUrl(LegalConstant::MODVAR_TERMS_URL, 'termsofuse'),
];
}
- if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_PRIVACY_ACTIVE, false)) {
+ if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_PRIVACY_ACTIVE)) {
$links[] = [
'text' => $this->translator->__('Privacy policy', 'zikulalegalmodule'),
'url' => $this->determineUrl(LegalConstant::MODVAR_PRIVACY_URL, 'privacypolicy'),
];
}
- if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_TRADECONDITIONS_ACTIVE, false)) {
+ if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_TRADECONDITIONS_ACTIVE)) {
$links[] = [
'text' => $this->translator->__('Trade conditions', 'zikulalegalmodule'),
'url' => $this->determineUrl(LegalConstant::MODVAR_TRADECONDITIONS_URL, 'tradeconditions'),
];
}
- if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_ACTIVE, false)) {
+ if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_ACTIVE)) {
$links[] = [
'text' => $this->translator->__('Cancellation right policy', 'zikulalegalmodule'),
'url' => $this->determineUrl(LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_URL, 'cancellationrightpolicy'),
];
}
- if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_ACCESSIBILITY_ACTIVE, false)) {
+ if ($this->variableApi->get(LegalConstant::MODNAME, LegalConstant::MODVAR_ACCESSIBILITY_ACTIVE)) {
$links[] = [
'text' => $this->translator->__('Accessibility statement', 'zikulalegalmodule'),
'url' => $this->determineUrl(LegalConstant::MODVAR_ACCESSIBILITY_URL, 'accessibilitystatement'),
@@ -145,11 +130,9 @@ private function getUser()
}
/**
- * get the Account links for this extension.
- *
- * @return array
+ * Get the account links for this extension.
*/
- private function getAccount()
+ private function getAccount(): array
{
$links = [];
$links[] = [
@@ -163,12 +146,8 @@ private function getAccount()
/**
* Determine the URL for a certain user link.
- *
- * @param string $urlVar Name of module var storing a possible custom url
- * @param string $defaultRoute Suffix for route for default url
- * @return string
*/
- private function determineUrl($urlVar, $defaultRoute)
+ private function determineUrl(string $urlVar, string $defaultRoute): string
{
$customUrl = $this->variableApi->get(LegalConstant::MODNAME, $urlVar, '');
if ('' !== $customUrl) {
@@ -178,12 +157,7 @@ private function determineUrl($urlVar, $defaultRoute)
return $this->router->generate('zikulalegalmodule_user_'.$defaultRoute);
}
- /**
- * set the BundleName as required by the interface.
- *
- * @return string
- */
- public function getBundleName()
+ public function getBundleName(): string
{
return LegalConstant::MODNAME;
}
diff --git a/Controller/ConfigController.php b/Controller/ConfigController.php
index 3484b18..09194cf 100644
--- a/Controller/ConfigController.php
+++ b/Controller/ConfigController.php
@@ -1,6 +1,7 @@
addFlash('status', $this->__('Operation cancelled.'));
}
- return $this->redirectToRoute('zikulalegalmodule_config_config'); // redirecting prevents values from being repeated in the form
+ // redirecting prevents values from being repeated in the form
+ return $this->redirectToRoute('zikulalegalmodule_config_config');
}
return [
diff --git a/Controller/UserController.php b/Controller/UserController.php
index 03a6b85..f49317c 100644
--- a/Controller/UserController.php
+++ b/Controller/UserController.php
@@ -1,6 +1,7 @@
getVar(LegalConstant::MODVAR_TERMS_URL, '');
if (empty($url)) {
@@ -56,10 +58,8 @@ public function indexAction()
* Display Legal notice.
*
* @throws AccessDeniedException Thrown if the user does not have the appropriate access level for the function
- *
- * @return Response
*/
- public function legalNoticeAction()
+ public function legalNoticeAction(): Response
{
$doc = $this->renderDocument('legalNotice', LegalConstant::MODVAR_LEGALNOTICE_ACTIVE, LegalConstant::MODVAR_LEGALNOTICE_URL);
@@ -72,10 +72,8 @@ public function legalNoticeAction()
* Display Terms of Use
*
* @throws AccessDeniedException Thrown if the user does not have the appropriate access level for the function
- *
- * @return Response
*/
- public function termsofuseAction()
+ public function termsofuseAction(): Response
{
$doc = $this->renderDocument('termsOfUse', LegalConstant::MODVAR_TERMS_ACTIVE, LegalConstant::MODVAR_TERMS_URL);
@@ -88,10 +86,8 @@ public function termsofuseAction()
* Display Privacy Policy
*
* @throws AccessDeniedException Thrown if the user does not have the appropriate access level for the function
- *
- * @return Response
*/
- public function privacyPolicyAction()
+ public function privacyPolicyAction(): Response
{
$doc = $this->renderDocument('privacyPolicy', LegalConstant::MODVAR_PRIVACY_ACTIVE, LegalConstant::MODVAR_PRIVACY_URL);
@@ -104,10 +100,8 @@ public function privacyPolicyAction()
* Display Accessibility statement
*
* @throws AccessDeniedException Thrown if the user does not have the appropriate access level for the function
- *
- * @return Response
*/
- public function accessibilitystatementAction()
+ public function accessibilitystatementAction(): Response
{
$doc = $this->renderDocument('accessibilityStatement', LegalConstant::MODVAR_ACCESSIBILITY_ACTIVE, LegalConstant::MODVAR_ACCESSIBILITY_URL);
@@ -120,10 +114,8 @@ public function accessibilitystatementAction()
* Display Cancellation right policy
*
* @throws AccessDeniedException Thrown if the user does not have the appropriate access level for the function
- *
- * @return Response
*/
- public function cancellationRightPolicyAction()
+ public function cancellationRightPolicyAction(): Response
{
$doc = $this->renderDocument('cancellationRightPolicy', LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_ACTIVE, LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_URL);
@@ -136,10 +128,8 @@ public function cancellationRightPolicyAction()
* Display Trade conditions
*
* @throws AccessDeniedException Thrown if the user does not have the appropriate access level for the function
- *
- * @return Response
*/
- public function tradeConditionsAction()
+ public function tradeConditionsAction(): Response
{
$doc = $this->renderDocument('tradeConditions', LegalConstant::MODVAR_TRADECONDITIONS_ACTIVE, LegalConstant::MODVAR_TRADECONDITIONS_URL);
@@ -155,22 +145,12 @@ public function tradeConditionsAction()
* If no custom URL exists, then this function will render and return the appropriate template for the legal document, as
* specified by $documentName. If the legal document
*
- * @param string $documentName The "name" of the document, as specified by the names of the user and text template
- * files in the format 'documentname.html.twig'
- * @param string $activeFlagKey The string used to name the module variable that indicates whether this legal document is
- * active or not; typically this is a constant from {@link LegalConstant}, such as
- * {@link LegalConstant::MODVAR_LEGALNOTICE_ACTIVE}
- * @param string $customUrlKey The string used to name the module variable that contains a custom static URL for the
- * legal document; typically this is a constant from {@link LegalConstant}, such as
- * {@link LegalConstant::MODVAR_TERMS_URL}
- *
* @throws AccessDeniedException Thrown if the user does not have the appropriate access level for the function
*
* @return RedirectResponse|string HTML output string
*/
- private function renderDocument($documentName, $activeFlagKey, $customUrlKey)
+ private function renderDocument(string $documentName, string $activeFlagKey, string $customUrlKey)
{
- // Security check
if (!$this->hasPermission(LegalConstant::MODNAME.'::'.$documentName, '::', ACCESS_OVERVIEW)) {
throw new AccessDeniedException();
}
@@ -195,13 +175,8 @@ private function renderDocument($documentName, $activeFlagKey, $customUrlKey)
* @Route("/acceptpolicies")
* @Template("ZikulaLegalModule:User:acceptPolicies.html.twig")
*
- * @param Request $request
- * @param CurrentUserApiInterface $currentUserApi
- * @param UserRepositoryInterface $userRepository
- * @param AccessHelper $accessHelper
- * @param AcceptPoliciesHelper $acceptPoliciesHelper
- *
* @return Response|array
+ * @throws Exception
*/
public function acceptPoliciesAction(
Request $request,
@@ -212,10 +187,14 @@ public function acceptPoliciesAction(
) {
// Retrieve and delete any session variables being sent in by the log-in process before we give the function a chance to
// throw an exception. We need to make sure no sensitive data is left dangling in the session variables.
- $uid = $request->getSession()->get(LegalConstant::FORCE_POLICY_ACCEPTANCE_SESSION_UID_KEY, null);
- $request->getSession()->remove(LegalConstant::FORCE_POLICY_ACCEPTANCE_SESSION_UID_KEY);
+ $session = $request->getSession();
+ $uid = null;
+ if (null !== $session) {
+ $uid = $session->get(LegalConstant::FORCE_POLICY_ACCEPTANCE_SESSION_UID_KEY);
+ $session->remove(LegalConstant::FORCE_POLICY_ACCEPTANCE_SESSION_UID_KEY);
+ }
- if (isset($uid)) {
+ if (null !== $uid) {
$login = true;
} else {
$login = false;
@@ -228,6 +207,7 @@ public function acceptPoliciesAction(
]);
if ($form->handleRequest($request)->isValid()) {
$data = $form->getData();
+ /** @var UserEntity $userEntity */
$userEntity = $userRepository->find($data['uid']);
$policiesToCheck = [
'termsOfUse' => LegalConstant::ATTRIBUTE_TERMSOFUSE_ACCEPTED,
@@ -236,8 +216,8 @@ public function acceptPoliciesAction(
'tradeConditions' => LegalConstant::ATTRIBUTE_TRADECONDITIONS_ACCEPTED,
'cancellationRightPolicy' => LegalConstant::ATTRIBUTE_CANCELLATIONRIGHTPOLICY_ACCEPTED,
];
- $nowUTC = new \DateTime('now', new \DateTimeZone('UTC'));
- $nowUTCStr = $nowUTC->format(\DateTime::ISO8601);
+ $nowUTC = new DateTime('now', new DateTimeZone('UTC'));
+ $nowUTCStr = $nowUTC->format(DateTime::ATOM);
$activePolicies = $acceptPoliciesHelper->getActivePolicies();
foreach ($policiesToCheck as $policyName => $acceptedVar) {
if ($data['acceptedpolicies_policies'] && $activePolicies[$policyName]) {
@@ -256,7 +236,7 @@ public function acceptPoliciesAction(
return $this->redirectToRoute('home');
}
- return $templateParameters = [
+ return [
'login' => $login,
'form' => $form->createView(),
'activePolicies' => $acceptPoliciesHelper->getActivePolicies(),
diff --git a/DependencyInjection/ZikulaLegalExtension.php b/DependencyInjection/ZikulaLegalExtension.php
index 79189ab..a02f9b4 100644
--- a/DependencyInjection/ZikulaLegalExtension.php
+++ b/DependencyInjection/ZikulaLegalExtension.php
@@ -1,6 +1,7 @@
setTranslator($translator);
}
- /**
- * @param TranslatorInterface $translator
- */
- public function setTranslator(TranslatorInterface $translator)
+ public function setTranslator(TranslatorInterface $translator): void
{
$this->translator = $translator;
}
- /**
- * {@inheritdoc}
- */
public function buildForm(FormBuilderInterface $builder, array $options)
{
$login = $builder->getData()['login'];
@@ -68,9 +60,6 @@ public function buildForm(FormBuilderInterface $builder, array $options)
;
}
- /**
- * {@inheritdoc}
- */
public function getBlockPrefix()
{
return Constant::FORM_BLOCK_PREFIX;
diff --git a/Form/Type/ConfigType.php b/Form/Type/ConfigType.php
index 7af1d38..5942db8 100644
--- a/Form/Type/ConfigType.php
+++ b/Form/Type/ConfigType.php
@@ -1,6 +1,7 @@
setTranslator($translator);
}
- /**
- * @param TranslatorInterface $translator
- */
- public function setTranslator(TranslatorInterface $translator)
+ public function setTranslator(TranslatorInterface $translator): void
{
$this->translator = $translator;
}
- /**
- * {@inheritdoc}
- */
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add(LegalConstant::MODVAR_LEGALNOTICE_ACTIVE, CheckboxType::class, [
'label' => $this->__('Legal notice'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_TERMS_ACTIVE, CheckboxType::class, [
'label' => $this->__('Terms of use'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_PRIVACY_ACTIVE, CheckboxType::class, [
'label' => $this->__('Privacy policy'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_TRADECONDITIONS_ACTIVE, CheckboxType::class, [
'label' => $this->__('General terms and conditions of trade'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_ACTIVE, CheckboxType::class, [
'label' => $this->__('Cancellation right policy'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_ACCESSIBILITY_ACTIVE, CheckboxType::class, [
'label' => $this->__('Accessibility statement'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_LEGALNOTICE_URL, UrlType::class, [
'label' => $this->__('Legal notice'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_TERMS_URL, UrlType::class, [
'label' => $this->__('Terms of use'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_PRIVACY_URL, UrlType::class, [
'label' => $this->__('Privacy policy'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_TRADECONDITIONS_URL, UrlType::class, [
'label' => $this->__('General terms and conditions of trade'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_URL, UrlType::class, [
'label' => $this->__('Cancellation right policy'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_ACCESSIBILITY_URL, UrlType::class, [
'label' => $this->__('Accessibility statement'),
- 'required' => false,
+ 'required' => false
])
->add(LegalConstant::MODVAR_EUCOOKIE, ChoiceType::class, [
'label' => $this->__('Enable cookie warning for EU compliance'),
@@ -111,17 +103,20 @@ public function buildForm(FormBuilderInterface $builder, array $options)
],
'expanded' => true,
'multiple' => false,
- 'help' => $this->__('Notice: This setting controls the EU cookie warning which is injected into the view and requires user assent.'),
+ 'help' => $this->__('Notice: This setting controls the EU cookie warning which is injected into the view and requires user assent.')
])
->add(LegalConstant::MODVAR_MINIMUM_AGE, IntegerType::class, [
'label' => $this->__('Minimum age permitted to register'),
- 'constraints' => [new GreaterThanOrEqual(0), new LessThanOrEqual(99)],
+ 'constraints' => [
+ new GreaterThanOrEqual(0),
+ new LessThanOrEqual(99)
+ ],
'empty_data' => 13,
'scale' => 0,
'attr' => [
'maxlength' => 2
],
- 'help' => $this->__('Enter a positive integer, or 0 for no age check.'),
+ 'help' => $this->__('Enter a positive integer, or 0 for no age check.')
])
->add('resetagreement', ChoiceType::class, [
'label' => $this->__('Reset user group\'s acceptance of site policies'),
@@ -130,36 +125,30 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'expanded' => false,
'multiple' => false,
'help' => $this->__('Leave blank to leave users unaffected.'),
- 'alert' => [$this->__('Notice: This setting resets the acceptance of the site policies for all users in this group. Next time they want to log-in, they will have to acknowledge their acceptance of them again, and will not be able to log-in if they do not. This action does not affect the main administrator account. You can perform the same operation for individual users by visiting the Users manager in the site admin panel.') => 'info'],
+ 'alert' => [$this->__('Notice: This setting resets the acceptance of the site policies for all users in this group. Next time they want to log-in, they will have to acknowledge their acceptance of them again, and will not be able to log-in if they do not. This action does not affect the main administrator account. You can perform the same operation for individual users by visiting the Users manager in the site admin panel.') => 'info']
])
->add('save', SubmitType::class, [
'label' => $this->__('Save'),
'icon' => 'fa-check',
'attr' => [
- 'class' => 'btn btn-success',
- ],
+ 'class' => 'btn btn-success'
+ ]
])
->add('cancel', SubmitType::class, [
'label' => $this->__('Cancel'),
'icon' => 'fa-times',
'attr' => [
- 'class' => 'btn btn-default',
- ],
+ 'class' => 'btn btn-default'
+ ]
])
;
}
- /**
- * {@inheritdoc}
- */
public function getBlockPrefix()
{
return 'zikulalegalmodule_config';
}
- /**
- * {@inheritdoc}
- */
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
diff --git a/Form/Type/PolicyType.php b/Form/Type/PolicyType.php
index cc8135c..fe7b156 100644
--- a/Form/Type/PolicyType.php
+++ b/Form/Type/PolicyType.php
@@ -1,6 +1,7 @@
setTranslator($translator);
}
- /**
- * @param TranslatorInterface $translator
- */
- public function setTranslator(TranslatorInterface $translator)
+ public function setTranslator(TranslatorInterface $translator): void
{
$this->translator = $translator;
}
- /**
- * {@inheritdoc}
- */
public function buildForm(FormBuilderInterface $builder, array $options)
{
$constraints = !$options['userEditAccess']
? [new IsTrue(['message' => $this->__('you must accept this site\'s policies')])]
- : [];
+ : []
+ ;
- $builder
- ->add('acceptedpolicies_policies', CheckboxType::class, [
- 'data' => false,
- 'help' => $this->__('Check this box to indicate your acceptance of this site\'s policies.'),
- 'label' => $this->__('Policies'),
- 'constraints' => $constraints,
- 'required' => !$options['userEditAccess']
- ]);
+ $builder->add('acceptedpolicies_policies', CheckboxType::class, [
+ 'data' => false,
+ 'help' => $this->__('Check this box to indicate your acceptance of this site\'s policies.'),
+ 'label' => $this->__('Policies'),
+ 'constraints' => $constraints,
+ 'required' => !$options['userEditAccess']
+ ]);
}
- /**
- * {@inheritdoc}
- */
public function getBlockPrefix()
{
return Constant::FORM_BLOCK_PREFIX;
}
- /**
- * {@inheritdoc}
- */
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
diff --git a/Helper/AcceptPoliciesHelper.php b/Helper/AcceptPoliciesHelper.php
index 3c6a2f7..f03bdf9 100644
--- a/Helper/AcceptPoliciesHelper.php
+++ b/Helper/AcceptPoliciesHelper.php
@@ -1,6 +1,7 @@
moduleVars[LegalConstant::MODVAR_TERMS_ACTIVE]) ? $this->moduleVars[LegalConstant::MODVAR_TERMS_ACTIVE] : false;
- $privacyPolicyActive = isset($this->moduleVars[LegalConstant::MODVAR_PRIVACY_ACTIVE]) ? $this->moduleVars[LegalConstant::MODVAR_PRIVACY_ACTIVE] : false;
+ $termsOfUseActive = $this->moduleVars[LegalConstant::MODVAR_TERMS_ACTIVE] ?? false;
+ $privacyPolicyActive = $this->moduleVars[LegalConstant::MODVAR_PRIVACY_ACTIVE] ?? false;
$agePolicyActive = isset($this->moduleVars[LegalConstant::MODVAR_MINIMUM_AGE]) ? 0 !== $this->moduleVars[LegalConstant::MODVAR_MINIMUM_AGE] : 0;
- $cancellationRightPolicyActive = isset($this->moduleVars[LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_ACTIVE]) ? $this->moduleVars[LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_ACTIVE] : false;
- $tradeConditionsActive = isset($this->moduleVars[LegalConstant::MODVAR_TRADECONDITIONS_ACTIVE]) ? $this->moduleVars[LegalConstant::MODVAR_TRADECONDITIONS_ACTIVE] : false;
+ $cancellationRightPolicyActive = $this->moduleVars[LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_ACTIVE] ?? false;
+ $tradeConditionsActive = $this->moduleVars[LegalConstant::MODVAR_TRADECONDITIONS_ACTIVE] ?? false;
return [
'termsOfUse' => $termsOfUseActive,
@@ -90,25 +84,20 @@ public function getActivePolicies()
/**
* Helper method to determine acceptance / confirmation states for current user.
- *
- * @param string $uid A valid numeric user id
- * @param string $modVarName Name of modvar storing desired state
- *
- * @return bool Fetched acceptance / confirmation state
*/
- private function determineAcceptanceState($uid, $modVarName)
+ private function determineAcceptanceState(int $uid, string $modVarName): bool
{
$acceptanceState = false;
- if (!is_null($uid) && !empty($uid) && is_numeric($uid) && $uid > 0) {
+ if (null !== $uid && !empty($uid) && is_numeric($uid) && $uid > 0) {
if ($uid > Constant::USER_ID_ADMIN) {
/** @var UserEntity $user */
$user = $this->userRepository->find($uid);
$acceptanceState = $user->getAttributes()->containsKey($modVarName) ? $user->getAttributeValue($modVarName) : false;
} else {
// The special users (uid == UsersConstant::USER_ID_ADMIN or UsersConstant::USER_ID_ANONYMOUS) have always accepted all policies.
- $now = new \DateTime('now', new \DateTimeZone('UTC'));
- $nowStr = $now->format(\DateTime::ISO8601);
+ $now = new \DateTime('now', new DateTimeZone('UTC'));
+ $nowStr = $now->format(DateTime::ATOM);
$acceptanceState = $nowStr;
}
}
@@ -118,12 +107,8 @@ private function determineAcceptanceState($uid, $modVarName)
/**
* Retrieves flags indicating which policies the user with the given uid has already accepted.
- *
- * @param string $uid A valid numeric user id
- *
- * @return array An array containing flags indicating whether each policy has been accepted by the user or not
*/
- public function getAcceptedPolicies($uid = null)
+ public function getAcceptedPolicies(int $uid = null): array
{
$termsOfUseAcceptedDateStr = $this->determineAcceptanceState($uid, LegalConstant::ATTRIBUTE_TERMSOFUSE_ACCEPTED);
$privacyPolicyAcceptedDateStr = $this->determineAcceptanceState($uid, LegalConstant::ATTRIBUTE_PRIVACYPOLICY_ACCEPTED);
@@ -131,13 +116,13 @@ public function getAcceptedPolicies($uid = null)
$cancellationRightPolicyAcceptedDateStr = $this->determineAcceptanceState($uid, LegalConstant::ATTRIBUTE_CANCELLATIONRIGHTPOLICY_ACCEPTED);
$tradeConditionsAcceptedDateStr = $this->determineAcceptanceState($uid, LegalConstant::ATTRIBUTE_TRADECONDITIONS_ACCEPTED);
- $termsOfUseAcceptedDate = $termsOfUseAcceptedDateStr ? new \DateTime($termsOfUseAcceptedDateStr) : false;
- $privacyPolicyAcceptedDate = $privacyPolicyAcceptedDateStr ? new \DateTime($privacyPolicyAcceptedDateStr) : false;
- $agePolicyConfirmedDate = $agePolicyConfirmedDateStr ? new \DateTime($agePolicyConfirmedDateStr) : false;
- $cancellationRightPolicyAcceptedDate = $cancellationRightPolicyAcceptedDateStr ? new \DateTime($cancellationRightPolicyAcceptedDateStr) : false;
- $tradeConditionsAcceptedDate = $tradeConditionsAcceptedDateStr ? new \DateTime($tradeConditionsAcceptedDateStr) : false;
+ $termsOfUseAcceptedDate = $termsOfUseAcceptedDateStr ? new DateTime($termsOfUseAcceptedDateStr) : false;
+ $privacyPolicyAcceptedDate = $privacyPolicyAcceptedDateStr ? new DateTime($privacyPolicyAcceptedDateStr) : false;
+ $agePolicyConfirmedDate = $agePolicyConfirmedDateStr ? new DateTime($agePolicyConfirmedDateStr) : false;
+ $cancellationRightPolicyAcceptedDate = $cancellationRightPolicyAcceptedDateStr ? new DateTime($cancellationRightPolicyAcceptedDateStr) : false;
+ $tradeConditionsAcceptedDate = $tradeConditionsAcceptedDateStr ? new DateTime($tradeConditionsAcceptedDateStr) : false;
- $now = new \DateTime();
+ $now = new DateTime();
$termsOfUseAccepted = $termsOfUseAcceptedDate ? $termsOfUseAcceptedDate <= $now : false;
$privacyPolicyAccepted = $privacyPolicyAcceptedDate ? $privacyPolicyAcceptedDate <= $now : false;
$agePolicyConfirmed = $agePolicyConfirmedDate ? $agePolicyConfirmedDate <= $now : false;
@@ -158,22 +143,18 @@ public function getAcceptedPolicies($uid = null)
*
* If the current user is the subject user, then the user can always see his status for each policy. If the current user is not the
* same as the subject user, then the current user can only see the status if he has ACCESS_MODERATE access for the policy.
- *
- * @param string $userId The numeric user id of the subject account record (not the current user, but the subject user); optional
- *
- * @return array An array containing flags indicating whether the current user is permitted to view the specified policy
*/
- public function getViewablePolicies($userId = null)
+ public function getViewablePolicies(int $userId = null): array
{
$currentUid = $this->currentUserApi->get('uid');
- $isCurrentUser = !is_null($userId) && $userId === $currentUid;
+ $isCurrentUser = null !== $userId && $userId === $currentUid;
return [
- 'termsOfUse' => $isCurrentUser ? true : $this->permissionApi->hasPermission('ZikulaLegalModule'.'::termsOfUse', '::', ACCESS_MODERATE),
- 'privacyPolicy' => $isCurrentUser ? true : $this->permissionApi->hasPermission('ZikulaLegalModule'.'::privacyPolicy', '::', ACCESS_MODERATE),
- 'agePolicy' => $isCurrentUser ? true : $this->permissionApi->hasPermission('ZikulaLegalModule'.'::agePolicy', '::', ACCESS_MODERATE),
- 'cancellationRightPolicy' => $isCurrentUser ? true : $this->permissionApi->hasPermission('ZikulaLegalModule'.'::cancellationRightPolicy', '::', ACCESS_MODERATE),
- 'tradeConditions' => $isCurrentUser ? true : $this->permissionApi->hasPermission('ZikulaLegalModule'.'::tradeConditions', '::', ACCESS_MODERATE),
+ 'termsOfUse' => $isCurrentUser ? true : $this->permissionApi->hasPermission('ZikulaLegalModule::termsOfUse', '::', ACCESS_MODERATE),
+ 'privacyPolicy' => $isCurrentUser ? true : $this->permissionApi->hasPermission('ZikulaLegalModule::privacyPolicy', '::', ACCESS_MODERATE),
+ 'agePolicy' => $isCurrentUser ? true : $this->permissionApi->hasPermission('ZikulaLegalModule::agePolicy', '::', ACCESS_MODERATE),
+ 'cancellationRightPolicy' => $isCurrentUser ? true : $this->permissionApi->hasPermission('ZikulaLegalModule::cancellationRightPolicy', '::', ACCESS_MODERATE),
+ 'tradeConditions' => $isCurrentUser ? true : $this->permissionApi->hasPermission('ZikulaLegalModule::tradeConditions', '::', ACCESS_MODERATE),
];
}
@@ -182,17 +163,15 @@ public function getViewablePolicies($userId = null)
*
* The current user can only edit the status if he has ACCESS_EDIT access for the policy, whether he is the subject user or not. The ability to edit
* status for login and new registrations is handled differently, and does not count on the output of this function.
- *
- * @return array An array containing flags indicating whether the current user is permitted to edit the specified policy
*/
- public function getEditablePolicies()
+ public function getEditablePolicies(): array
{
return [
- 'termsOfUse' => $this->permissionApi->hasPermission('ZikulaLegalModule'.'::termsOfUse', '::', ACCESS_EDIT),
- 'privacyPolicy' => $this->permissionApi->hasPermission('ZikulaLegalModule'.'::privacyPolicy', '::', ACCESS_EDIT),
- 'agePolicy' => $this->permissionApi->hasPermission('ZikulaLegalModule'.'::agePolicy', '::', ACCESS_EDIT),
- 'cancellationRightPolicy' => $this->permissionApi->hasPermission('ZikulaLegalModule'.'::cancellationRightPolicy', '::', ACCESS_EDIT),
- 'tradeConditions' => $this->permissionApi->hasPermission('ZikulaLegalModule'.'::tradeConditions', '::', ACCESS_EDIT),
+ 'termsOfUse' => $this->permissionApi->hasPermission('ZikulaLegalModule::termsOfUse', '::', ACCESS_EDIT),
+ 'privacyPolicy' => $this->permissionApi->hasPermission('ZikulaLegalModule::privacyPolicy', '::', ACCESS_EDIT),
+ 'agePolicy' => $this->permissionApi->hasPermission('ZikulaLegalModule::agePolicy', '::', ACCESS_EDIT),
+ 'cancellationRightPolicy' => $this->permissionApi->hasPermission('ZikulaLegalModule::cancellationRightPolicy', '::', ACCESS_EDIT),
+ 'tradeConditions' => $this->permissionApi->hasPermission('ZikulaLegalModule::tradeConditions', '::', ACCESS_EDIT),
];
}
}
diff --git a/Helper/ResetAgreementHelper.php b/Helper/ResetAgreementHelper.php
index 8dac212..7db835a 100644
--- a/Helper/ResetAgreementHelper.php
+++ b/Helper/ResetAgreementHelper.php
@@ -1,6 +1,7 @@
permissionApi->hasPermission(LegalConstant::MODNAME . '::', '::', ACCESS_ADMIN)) {
throw new AccessDeniedException();
}
if (!is_numeric($groupId) || $groupId < 0) {
- throw new \Exception();
+ throw new Exception();
}
$attributeNames = [
@@ -82,9 +73,8 @@ public function reset($groupId)
LegalConstant::ATTRIBUTE_TRADECONDITIONS_ACCEPTED
];
- if (0 === $groupId) {
- $members = [];
- } else {
+ $members = [];
+ if (0 !== $groupId) {
$group = $this->groupRepository->find($groupId);
if (empty($group)) {
return false;
diff --git a/LegalModuleInstaller.php b/LegalModuleInstaller.php
index 457dd4b..1bb7696 100644
--- a/LegalModuleInstaller.php
+++ b/LegalModuleInstaller.php
@@ -1,6 +1,7 @@
setVars([
@@ -49,17 +45,7 @@ public function install()
return true;
}
- /**
- * Upgrade the module from a prior version.
- *
- * This function must consider all the released versions of the module!
- * If the upgrade fails at some point, it returns the last upgraded version.
- *
- * @param string $oldVersion The version number string from which the upgrade starting
- *
- * @return bool|string True if the module is successfully upgraded to the current version; last valid version string or false if the upgrade fails
- */
- public function upgrade($oldVersion)
+ public function upgrade(string $oldVersion): bool
{
// Upgrade dependent on old version number
switch ($oldVersion) {
@@ -132,12 +118,7 @@ public function upgrade($oldVersion)
return true;
}
- /**
- * Delete the Legal module.
- *
- * @return bool True if successful; otherwise false
- */
- public function uninstall()
+ public function uninstall(): bool
{
$this->delVars();
diff --git a/Listener/EuCookieWarningInjectorListener.php b/Listener/EuCookieWarningInjectorListener.php
index d9c272f..0acb968 100644
--- a/Listener/EuCookieWarningInjectorListener.php
+++ b/Listener/EuCookieWarningInjectorListener.php
@@ -1,6 +1,7 @@
router = $router;
$this->assetHelper = $assetHelper;
@@ -82,7 +75,7 @@ public function __construct(
$this->stylesheetOverride = $stylesheetOverride;
}
- public function onKernelResponse(FilterResponseEvent $event)
+ public function onKernelResponse(FilterResponseEvent $event): void
{
if (!$this->enabled) {
return;
@@ -95,16 +88,16 @@ public function onKernelResponse(FilterResponseEvent $event)
try {
$routeInfo = $this->router->match($request->getPathInfo());
- } catch (\Exception $e) {
+ } catch (Exception $exception) {
return;
}
$containsProhibitedRoute = in_array($routeInfo['_route'], ['_wdt', 'bazinga_jstranslation_js', 'fos_js_routing_js', 'zikulasearchmodule_search_opensearch']);
$containsProhibitedRoute = $containsProhibitedRoute || (false !== mb_strpos($routeInfo['_route'], '_profiler'));
// do not capture redirects or modify XML HTTP Requests or routing or toolbar requests
- if ($request->isXmlHttpRequest()
- || $response->isRedirect()
- || $containsProhibitedRoute) {
+ if ($containsProhibitedRoute
+ || $request->isXmlHttpRequest()
+ || $response->isRedirect()) {
return;
}
@@ -113,16 +106,13 @@ public function onKernelResponse(FilterResponseEvent $event)
return;
}
- $this->injectWarning($request, $response);
+ $this->injectWarning();
}
/**
- * Injects the warning into the Response.
- *
- * @param Request $request A Request instance
- * @param Response $response A Response instance
+ * Injects the warning into the given Response.
*/
- protected function injectWarning(Request $request, Response $response)
+ protected function injectWarning(): void
{
// add javascript to bottom of body - jquery is assumed to be present
$path = $this->assetHelper->resolve('@' . LegalConstant::MODNAME . ':js/jquery.cookiebar/jquery.cookiebar.js');
diff --git a/Listener/UsersUiListener.php b/Listener/UsersUiListener.php
index 62967aa..f2592b0 100644
--- a/Listener/UsersUiListener.php
+++ b/Listener/UsersUiListener.php
@@ -1,6 +1,7 @@
twig = $twig;
$this->translator = $translator;
$this->router = $router;
- $this->currentUserApi = $currentUserApi;
$this->moduleVars = $variableApi->getAll('ZikulaLegalModule');
$this->acceptPoliciesHelper = $acceptPoliciesHelper;
$this->formFactory = $formFactory;
@@ -149,12 +130,8 @@ public static function getSubscribedEvents()
/**
* Responds to ui.view hook-like event notifications.
- *
- * @param GenericEvent $event The event that triggered this function call
- *
- * @return void
*/
- public function uiView(GenericEvent $event)
+ public function uiView(GenericEvent $event): void
{
$activePolicies = $this->acceptPoliciesHelper->getActivePolicies();
$activePolicyCount = array_sum($activePolicies);
@@ -184,18 +161,14 @@ public function uiView(GenericEvent $event)
* This handler is triggered by the 'user.login.veto' event. It vetos (denies) a
* login attempt if the users's Legal record is flagged to force the user to accept
* one or more legal agreements.
- *
- * @param GenericEvent $event The event that triggered this handler
- *
- * @return void
*/
- public function acceptPolicies(GenericEvent $event)
+ public function acceptPolicies(GenericEvent $event): void
{
- $termsOfUseActive = isset($this->moduleVars[LegalConstant::MODVAR_TERMS_ACTIVE]) ? $this->moduleVars[LegalConstant::MODVAR_TERMS_ACTIVE] : false;
- $privacyPolicyActive = isset($this->moduleVars[LegalConstant::MODVAR_PRIVACY_ACTIVE]) ? $this->moduleVars[LegalConstant::MODVAR_PRIVACY_ACTIVE] : false;
+ $termsOfUseActive = $this->moduleVars[LegalConstant::MODVAR_TERMS_ACTIVE] ?? false;
+ $privacyPolicyActive = $this->moduleVars[LegalConstant::MODVAR_PRIVACY_ACTIVE] ?? false;
$agePolicyActive = isset($this->moduleVars[LegalConstant::MODVAR_MINIMUM_AGE]) ? 0 !== $this->moduleVars[LegalConstant::MODVAR_MINIMUM_AGE] : 0;
- $cancellationRightPolicyActive = isset($this->moduleVars[LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_ACTIVE]) ? $this->moduleVars[LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_ACTIVE] : false;
- $tradeConditionsActive = isset($this->moduleVars[LegalConstant::MODVAR_TRADECONDITIONS_ACTIVE]) ? $this->moduleVars[LegalConstant::MODVAR_TRADECONDITIONS_ACTIVE] : false;
+ $cancellationRightPolicyActive = $this->moduleVars[LegalConstant::MODVAR_CANCELLATIONRIGHTPOLICY_ACTIVE] ?? false;
+ $tradeConditionsActive = $this->moduleVars[LegalConstant::MODVAR_TRADECONDITIONS_ACTIVE] ?? false;
if (!$termsOfUseActive && !$privacyPolicyActive && !$agePolicyActive && !$tradeConditionsActive && !$cancellationRightPolicyActive) {
return;
@@ -228,15 +201,14 @@ public function acceptPolicies(GenericEvent $event)
$event->stopPropagation();
$event->setArgument('returnUrl', $this->router->generate('zikulalegalmodule_user_acceptpolicies'));
- $session = $this->requestStack->getMasterRequest()->getSession();
- $session->set(LegalConstant::FORCE_POLICY_ACCEPTANCE_SESSION_UID_KEY, $userObj->getUid());
- $session->getFlashBag()->add('error', $this->translator->__('Your log-in request was not completed. You must review and confirm your acceptance of one or more site policies prior to logging in.'));
+ $session = null !== $this->requestStack->getMasterRequest() ? $this->requestStack->getMasterRequest()->getSession() : null;
+ if (null !== $session) {
+ $session->set(LegalConstant::FORCE_POLICY_ACCEPTANCE_SESSION_UID_KEY, $userObj->getUid());
+ $session->getFlashBag()->add('error', $this->translator->__('Your log-in request was not completed. You must review and confirm your acceptance of one or more site policies prior to logging in.'));
+ }
}
- /**
- * @param UserFormAwareEvent $event
- */
- public function amendForm(UserFormAwareEvent $event)
+ public function amendForm(UserFormAwareEvent $event): void
{
$activePolicies = $this->acceptPoliciesHelper->getActivePolicies();
if (array_sum($activePolicies) < 1) {
@@ -251,7 +223,7 @@ public function amendForm(UserFormAwareEvent $event)
'error_bubbling' => true,
'auto_initialize' => false,
'mapped' => false,
- 'userEditAccess' => $this->permissionApi->hasPermission('ZikulaUsersModule::', $uname . "::" . $uid, ACCESS_EDIT)
+ 'userEditAccess' => $this->permissionApi->hasPermission('ZikulaUsersModule::', $uname . '::' . $uid, ACCESS_EDIT)
]);
$acceptedPolicies = $this->acceptPoliciesHelper->getAcceptedPolicies($uid);
$event
@@ -264,32 +236,30 @@ public function amendForm(UserFormAwareEvent $event)
$this->translator->setDomain($originalDomain);
}
- /**
- * @param UserFormDataEvent $event
- */
- public function editFormHandler(UserFormDataEvent $event)
+ public function editFormHandler(UserFormDataEvent $event): void
{
$userEntity = $event->getUserEntity();
$formData = $event->getFormData(LegalConstant::FORM_BLOCK_PREFIX);
- if (isset($formData)) {
- $policiesToCheck = [
- 'termsOfUse' => LegalConstant::ATTRIBUTE_TERMSOFUSE_ACCEPTED,
- 'privacyPolicy' => LegalConstant::ATTRIBUTE_PRIVACYPOLICY_ACCEPTED,
- 'agePolicy' => LegalConstant::ATTRIBUTE_AGEPOLICY_CONFIRMED,
- 'tradeConditions' => LegalConstant::ATTRIBUTE_TRADECONDITIONS_ACCEPTED,
- 'cancellationRightPolicy' => LegalConstant::ATTRIBUTE_CANCELLATIONRIGHTPOLICY_ACCEPTED,
- ];
- $nowUTC = new \DateTime('now', new \DateTimeZone('UTC'));
- $nowUTCStr = $nowUTC->format(\DateTime::ISO8601);
- $activePolicies = $this->acceptPoliciesHelper->getActivePolicies();
- foreach ($policiesToCheck as $policyName => $acceptedVar) {
- if ($formData['acceptedpolicies_policies'] && $activePolicies[$policyName]) {
- $userEntity->setAttribute($acceptedVar, $nowUTCStr);
- } else {
- $userEntity->delAttribute($acceptedVar);
- }
+ if (!isset($formData)) {
+ return;
+ }
+ $policiesToCheck = [
+ 'termsOfUse' => LegalConstant::ATTRIBUTE_TERMSOFUSE_ACCEPTED,
+ 'privacyPolicy' => LegalConstant::ATTRIBUTE_PRIVACYPOLICY_ACCEPTED,
+ 'agePolicy' => LegalConstant::ATTRIBUTE_AGEPOLICY_CONFIRMED,
+ 'tradeConditions' => LegalConstant::ATTRIBUTE_TRADECONDITIONS_ACCEPTED,
+ 'cancellationRightPolicy' => LegalConstant::ATTRIBUTE_CANCELLATIONRIGHTPOLICY_ACCEPTED,
+ ];
+ $nowUTC = new DateTime('now', new DateTimeZone('UTC'));
+ $nowUTCStr = $nowUTC->format(DateTime::ATOM);
+ $activePolicies = $this->acceptPoliciesHelper->getActivePolicies();
+ foreach ($policiesToCheck as $policyName => $acceptedVar) {
+ if ($formData['acceptedpolicies_policies'] && $activePolicies[$policyName]) {
+ $userEntity->setAttribute($acceptedVar, $nowUTCStr);
+ } else {
+ $userEntity->delAttribute($acceptedVar);
}
- $this->doctrine->getManager()->flush();
}
+ $this->doctrine->getManager()->flush();
}
}
diff --git a/Resources/public/js/ZikulaLegalModule.User.AcceptPolicies.js b/Resources/public/js/ZikulaLegalModule.User.AcceptPolicies.js
index a71c6e4..8c95b31 100644
--- a/Resources/public/js/ZikulaLegalModule.User.AcceptPolicies.js
+++ b/Resources/public/js/ZikulaLegalModule.User.AcceptPolicies.js
@@ -2,14 +2,14 @@
( function($) {
$(document).ready(function() {
- $('.policy-link').on('click', function(event) {
+ $('.policy-link').on('click', function (event) {
event.preventDefault();
$('#modal-policy-title').text($(this).text());
$('#modal-policy-body').load($(this).attr('href'));
$('#modal-policy').modal('show');
});
- $('#modal-policy').on('hidden.bs.modal', function (e) {
+ $('#modal-policy').on('hidden.bs.modal', function (event) {
$('#modal-policy-body').html('');
- })
+ });
});
})(jQuery);
diff --git a/Twig/TwigExtension.php b/Twig/TwigExtension.php
index 47bfba4..5ee9560 100644
--- a/Twig/TwigExtension.php
+++ b/Twig/TwigExtension.php
@@ -12,6 +12,7 @@
namespace Zikula\LegalModule\Twig;
+use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
use Twig\Environment;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
@@ -27,13 +28,14 @@ class TwigExtension extends AbstractExtension
private $twig;
/**
- * Constructor.
- *
- * @param Environment $twig The twig templating service
+ * @var FilesystemLoader
*/
- public function __construct(Environment $twig)
+ protected $twigLoader;
+
+ public function __construct(Environment $twig, FilesystemLoader $twigLoader)
{
$this->twig = $twig;
+ $this->twigLoader = $twigLoader;
}
/**
@@ -63,31 +65,21 @@ public function getFunctions()
* InlineLink/privacyPolicy.html.twig
* InlineLink/termsOfUse.html.twig
* InlineLink/tradeConditions.html.twig
- *
- * @param string $policy The unique string identifier of the policy type whose inline link is to be returned; required
- * @param string $target The target for the generated link, such as "_blank" to open the policy in a new window; optional, default is blank (same effect as "_self")
- *
- * @return string The rendered template output for the specified policy type
*/
- public function inlineLink($policy = '', $target = '')
+ public function inlineLink(string $policy = '', string $target = ''): string
{
- $defaultTemplate = '@ZikulaLegalModule/InlineLink/notFound.html.twig';
-
+ $templatePath = '@ZikulaLegalModule/InlineLink/';
$templateParameters = [
- 'target' => $target,
+ 'target' => $target
];
if (!empty($policy)) {
- try {
- $output = $this->twig->render('@ZikulaLegalModule/InlineLink/'.$policy.'.html.twig', $templateParameters);
-
- return $output;
- } catch (\Exception $e) {
- // template does not exist
- return $this->twig->render($defaultTemplate, $templateParameters);
+ $template = $templatePath . $policy . '.html.twig';
+ if ($this->twigLoader->exists($template)) {
+ return $this->twig->render($template, $templateParameters);
}
}
- return $this->twig->render($defaultTemplate, $templateParameters);
+ return $this->twig->render($templatePath . 'notFound.html.twig', $templateParameters);
}
}
diff --git a/ZikulaLegalModule.php b/ZikulaLegalModule.php
index ee98aa3..2c63b21 100644
--- a/ZikulaLegalModule.php
+++ b/ZikulaLegalModule.php
@@ -1,6 +1,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/zikula.manifest.json b/zikula.manifest.json
index 3ddce72..2802011 100644
--- a/zikula.manifest.json
+++ b/zikula.manifest.json
@@ -10,8 +10,8 @@
"icon": ""
},
"version": {
- "semver": "3.1.2",
- "compatibility": ">=1.5.0 <3.0",
+ "semver": "3.2.2",
+ "compatibility": ">=3.0.0 <4.0",
"composerpath": "composer.json",
"description": "Zikula Legal module.",
"keywords": [