You are here

public function RestIncidentStorage::injectSettings in Radioactivity 8.3

Same name and namespace in other branches
  1. 4.0.x src/RestIncidentStorage.php \Drupal\radioactivity\RestIncidentStorage::injectSettings()

Add endpoint settings to the page.

Parameters

array $page: Page attachments as provided by hook_page_attachments_alter().

Overrides IncidentStorageInterface::injectSettings

File

src/RestIncidentStorage.php, line 71

Class

RestIncidentStorage
Defines a REST incident storage.

Namespace

Drupal\radioactivity

Code

public function injectSettings(array &$page) {
  $page['#attached']['drupalSettings']['radioactivity']['type'] = 'rest';
  $page['#attached']['drupalSettings']['radioactivity']['endpoint'] = $this
    ->getEndpoint();
}