You are here

protected function ProfileStatSender::fetchData in Brainstorm profile 8

Fetches data about site into associative array.

Return value

array Associative array containing data about this site.

1 call to ProfileStatSender::fetchData()
ProfileStatSender::sendData in module/custom/profile_stat_sender/src/ProfileStatSender.php
Makes http POST request to server.

File

module/custom/profile_stat_sender/src/ProfileStatSender.php, line 69
This file contains ProfileStatSender service implementation.

Class

ProfileStatSender
Provides ProfileStatSender service implementation.

Namespace

Drupal\profile_stat_sender

Code

protected function fetchData() {
  $data = [
    'site_key' => $this->siteKey,
    'name' => \Drupal::config('system.site')
      ->get('name'),
    'profile' => drupal_get_profile(),
    'url' => $this
      ->getClientUrl(),
  ];
  return $data;
}