public function RestIncidentStorage::injectSettings in Radioactivity 4.0.x
Same name and namespace in other branches
- 8.3 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\radioactivityCode
public function injectSettings(array &$page) {
$page['#attached']['drupalSettings']['radioactivity']['type'] = 'rest';
$page['#attached']['drupalSettings']['radioactivity']['endpoint'] = $this
->getEndpoint();
}