You are here

function push_notifications_get_certificate_name in Push Notifications 8

Get name of random certificate.

Parameters

string $environment: Environment name.

Return value

string Certificate filename.

2 calls to push_notifications_get_certificate_name()
PushNotificationsBroadcasterApns::determineCertificatePath in src/PushNotificationsBroadcasterApns.php
Determine the realpath to the APNS certificate.
PushNotificationsConfigForm::buildForm in src/Form/PushNotificationsConfigForm.php
Form constructor.

File

./push_notifications.module, line 90
Contains push_notifications.module functionality.

Code

function push_notifications_get_certificate_name($environment = 'development') {
  $filename = array(
    'apns',
    $environment,
    \Drupal::config('push_notifications.apns')
      ->get('certificate_random'),
  );
  return implode('-', $filename) . '.pem';
}