public function FirebaseMessageService::__construct in Firebase Push Notification (FCM) 8
Same name and namespace in other branches
- 3.0.x src/Service/FirebaseMessageService.php \Drupal\firebase\Service\FirebaseMessageService::__construct()
Constructs a FirebaseServiceBase object.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $configFactory: The factory for configuration objects.
\GuzzleHttp\ClientInterface $client: An HTTP client.
\Drupal\Core\Logger\LoggerChannelInterface $loggerChannel: The logger channel.
Overrides FirebaseServiceBase::__construct
File
- src/
Service/ FirebaseMessageService.php, line 39
Class
- FirebaseMessageService
- Service for pushing message to mobile devices using Firebase.
Namespace
Drupal\firebase\ServiceCode
public function __construct(ConfigFactory $configFactory, ClientInterface $client, LoggerChannelInterface $loggerChannel) {
parent::__construct($configFactory, $client, $loggerChannel);
$config = $this->configFactory
->get('firebase.settings');
$this->key = $config
->get('server_key');
$this->endpoint = self::ENDPOINT;
}