You are here

public function SmsGatewayPluginManager::__construct in SMS Framework 8

Same name and namespace in other branches
  1. 2.x src/Plugin/SmsGatewayPluginManager.php \Drupal\sms\Plugin\SmsGatewayPluginManager::__construct()
  2. 2.1.x src/Plugin/SmsGatewayPluginManager.php \Drupal\sms\Plugin\SmsGatewayPluginManager::__construct()

Creates a new SmsGatewayPluginManager instance.

Parameters

\Traversable $namespaces: The namespaces to search for the gateway plugins.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: Module handler for calling module hooks.

Overrides DefaultPluginManager::__construct

File

src/Plugin/SmsGatewayPluginManager.php, line 24

Class

SmsGatewayPluginManager
Manages SMS gateways implemented using AnnotatedClassDiscovery.

Namespace

Drupal\sms\Plugin

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  parent::__construct('Plugin/SmsGateway', $namespaces, $module_handler, 'Drupal\\sms\\Plugin\\SmsGatewayPluginInterface', 'Drupal\\sms\\Annotation\\SmsGateway');
  $this
    ->setCacheBackend($cache_backend, 'sms_gateways');
  $this
    ->alterInfo('sms_gateway_info');
}