AdsenseAdManager.php in Google AdSense integration 8
File
src/AdsenseAdManager.php
View source
<?php
namespace Drupal\adsense;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
class AdsenseAdManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/AdsenseAd', $namespaces, $module_handler, 'Drupal\\adsense\\AdsenseAdInterface', 'Drupal\\adsense\\Annotation\\AdsenseAd');
$this
->alterInfo('adsense_ad_info');
$this
->setCacheBackend($cache_backend, 'adsense_ad');
}
}