Skip to content

AnalyticsServiceManager

Provides a plugin manager for analytics items.


  • Full name: \Drupal\analytics\AnalyticsServiceManager
  • Parent class: DefaultPluginManager
  • This class implements: FallbackPluginManagerInterface

See Also:

  • \Drupal\analytics\Attribute\AnalyticsService
  • \Drupal\analytics\Plugin\ServicePluginBase
  • \Drupal\analytics\Plugin\ServicePluginInterface
  • \Drupal\analytics\plugin_api

Methods

__construct

Constructs a new AnalyticsServiceManager object.

public __construct(\Traversable $namespaces, \Drupal\Core\Cache\CacheBackendInterface $cache_backend, \Drupal\Core\Extension\ModuleHandlerInterface $module_handler): mixed

Parameters:

Parameter Type Description
$namespaces \Traversable
An object that implements \Traversable which contains the root paths
keyed by the corresponding namespace to look for plugin implementations.
$cache_backend \Drupal\Core\Cache\CacheBackendInterface
Cache backend instance to use.
$module_handler \Drupal\Core\Extension\ModuleHandlerInterface
The module handler to invoke the alter hook with.

getFallbackPluginId

{@inheritdoc}

public getFallbackPluginId(mixed $plugin_id, array $configuration = []): string

Parameters:

Parameter Type Description
$plugin_id mixed
$configuration array

createInstance

{@inheritdoc}

public createInstance(mixed $plugin_id, array $configuration = []): object

Parameters:

Parameter Type Description
$plugin_id mixed
$configuration array

handlePluginNotFound

{@inheritdoc}

protected handlePluginNotFound(mixed $plugin_id, array $configuration): object

Parameters:

Parameter Type Description
$plugin_id mixed
$configuration array