You are here

public function NewRelicConfigSubscriber::__construct in New Relic 2.x

Same name and namespace in other branches
  1. 8 src/EventSubscriber/NewRelicConfigSubscriber.php \Drupal\new_relic_rpm\EventSubscriber\NewRelicConfigSubscriber::__construct()
  2. 2.0.x src/EventSubscriber/NewRelicConfigSubscriber.php \Drupal\new_relic_rpm\EventSubscriber\NewRelicConfigSubscriber::__construct()

Constructs a NewRelicConfigSubscriber.

Parameters

\Drupal\new_relic_rpm\ExtensionAdapter\NewRelicAdapterInterface $adapter: The Adapter that we use to talk to the New Relic extension.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The object we use to get our settings.

\Drupal\Core\Session\AccountInterface $current_user: The currently logged in user.

File

src/EventSubscriber/NewRelicConfigSubscriber.php, line 51

Class

NewRelicConfigSubscriber
Config event listener to mark deployments when a user imports configuration.

Namespace

Drupal\new_relic_rpm\EventSubscriber

Code

public function __construct(NewRelicAdapterInterface $adapter, ConfigFactoryInterface $config_factory, AccountInterface $current_user) {
  $this->adapter = $adapter;
  $this->configFactory = $config_factory;
  $this->currentUser = $current_user;
}