You are here

function acquia_connector_has_update_service in Acquia Connector 8.2

Same name and namespace in other branches
  1. 8 acquia_connector.module \acquia_connector_has_update_service()
  2. 3.x acquia_connector.module \acquia_connector_has_update_service()

Returns the stored subscription data.

Return value

mixed Returns the stored subscription data if update service is enabled or FALSE otherwise.

1 call to acquia_connector_has_update_service()
acquia_connector_update_status_alter in ./acquia_connector.module
Implements hook_update_status_alter().

File

./acquia_connector.module, line 206
Acquia Connector module.

Code

function acquia_connector_has_update_service() {

  // Include version number information.
  acquia_connector_load_versions();
  $subscription = Drupal::state()
    ->get('acquia_subscription_data');
  if (!IS_ACQUIA_DRUPAL || empty($subscription['active']) || isset($subscription['update_service']) && empty($subscription['update_service'])) {

    // We don't have update service if (1) this is not Acquia Drupal, (2) there
    // is no subscription or (3) the update service was disabled on acquia.com.
    // Requiring the update_service key and checking its value separately is
    // important for backwards compatibility. Isset & empty tells us
    // that the web service willingly told us to not do update notifications.
    return FALSE;
  }
  return $subscription;
}