You are here

public function LogGateway::__construct in SMS Framework 8

Constructs a LogGateway object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger factory.

Overrides SmsGatewayPluginBase::__construct

File

src/Plugin/SmsGateway/LogGateway.php, line 44

Class

LogGateway
Defines a logger gateway for testing and debugging.

Namespace

Drupal\sms\Plugin\SmsGateway

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, LoggerChannelFactoryInterface $logger_factory) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $definition = $this
    ->getPluginDefinition();
  $this->logger = $logger_factory
    ->get($definition['provider'] . '.' . $definition['id']);
}