public function NewRelicConfigSubscriber::__construct in New Relic 8
Same name and namespace in other branches
- 2.x src/EventSubscriber/NewRelicConfigSubscriber.php \Drupal\new_relic_rpm\EventSubscriber\NewRelicConfigSubscriber::__construct()
- 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\EventSubscriberCode
public function __construct(NewRelicAdapterInterface $adapter, ConfigFactoryInterface $config_factory, AccountInterface $current_user) {
$this->adapter = $adapter;
$this->config = $config_factory
->get('new_relic_rpm.settings');
$this->currentUser = $current_user;
}