ConsentStorageManager.php in EU Cookie Compliance (GDPR Compliance) 2.0.x
File
src/Plugin/ConsentStorageManager.php
View source
<?php
namespace Drupal\eu_cookie_compliance\Plugin;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Component\Plugin\FallbackPluginManagerInterface;
class ConsentStorageManager extends DefaultPluginManager implements FallbackPluginManagerInterface {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/ConsentStorage', $namespaces, $module_handler, 'Drupal\\eu_cookie_compliance\\Plugin\\ConsentStorageInterface', 'Drupal\\eu_cookie_compliance\\Annotation\\ConsentStorage');
$this
->alterInfo('consent_storage_info');
$this
->setCacheBackend($cache_backend, 'consent_storage_info_plugins');
}
public function getFallbackPluginId($plugin_id, array $configuration = []) {
return 'basic';
}
}