AnalyticsHooks
Hook implementations for analytics.
- Full name:
\Drupal\analytics\Hook\AnalyticsHooks
Properties
configFactory
protected \Drupal\Core\Config\ConfigFactoryInterface $configFactory
entityTypeManager
protected \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
Methods
__construct
public __construct(\Drupal\Core\Config\ConfigFactoryInterface $configFactory, \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$configFactory |
\Drupal\Core\Config\ConfigFactoryInterface | |
$entityTypeManager |
\Drupal\Core\Entity\EntityTypeManagerInterface |
pageBottom
Implements hook_page_bottom().
public pageBottom(array& $page_bottom): void
Parameters:
| Parameter | Type | Description |
|---|---|---|
$page_bottom |
array |
getOrigin
Reduces a URL to its origin, for a Content Security Policy source.
protected static getOrigin(string $url): string|null
- This method is static. Parameters:
| Parameter | Type | Description |
|---|---|---|
$url |
string | |
| An absolute URL. |
Return Value:
The URL's scheme, host and port, or NULL if it has no scheme or host.
runtimeRequirements
Implements hook_runtime_requirements().
public runtimeRequirements(): array
pageAttachments
Implements hook_page_attachments().
public pageAttachments(array& $attachments): void
Parameters:
| Parameter | Type | Description |
|---|---|---|
$attachments |
array |