Commit 40142f93 authored by Roberto Peruzzo's avatar Roberto Peruzzo
Browse files

Issue #3255572 by robertoperuzzo, devad, ConradFlashback: Iubenda Integration...

parent 74346670
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -7,3 +7,6 @@ interdiff-*
# Ingnore composer files
vendor
composer.lock

# Ludwig libraries
lib
+2 −6
Original line number Diff line number Diff line
@@ -17,11 +17,7 @@ function iubenda_integration_requirements($phase) {
    return [];
  }

  $class_path = '/vendor/iubenda/iubenda-cookie-class/iubenda.class.php';

  if (!file_exists(DRUPAL_ROOT . $class_path)
    && !file_exists(DRUPAL_ROOT . '/..' . $class_path)) {

  if (!class_exists('iubendaParser')) {
    return [
      IUBENDA_INTEGRATION_CLASS_LIB_NAME => [
        'title' => t('Iubenda PHP class'),
@@ -30,7 +26,7 @@ function iubenda_integration_requirements($phase) {
          '@a' => IUBENDA_INTEGRATION_CLASS_MIN_VER,
        ]),
        'severity' => REQUIREMENT_ERROR,
        'description' => t('You need to run command shell "composer install" inside Drupal project root.'
        'description' => t('You need to install this module with Composer. Alternatively, you can use <a href="https://www.drupal.org/project/ludwig" target="_blank">Ludwig</a> to manage this library dependancy.'
        ),
      ],
    ];
+6 −0
Original line number Diff line number Diff line
@@ -5,6 +5,12 @@
 * Code for Iubenda Integration module.
 */

// Ludwig module integration.
if (\Drupal::hasService('ludwig.require_once')) {
  $ludwig_require_once = \Drupal::service('ludwig.require_once');
  $ludwig_require_once->requireOnce('iubenda/iubenda-cookie-class', 'iubenda.class.php', dirname(__FILE__));
}

/**
 * Defining Iubenda privacy policy URL.
 */

ludwig.json

0 → 100644
+8 −0
Original line number Diff line number Diff line
{
  "require": {
    "iubenda/iubenda-cookie-class": {
        "version": "4.1.8",
        "url": "https://github.com/iubenda/iubenda-cookie-class/archive/v4.1.8.zip"
      }
  }
}