You are here

interface ServicePluginInterface in Analytics 8

Defines an interface for analytics service plugins.

Hierarchy

Expanded class hierarchy of ServicePluginInterface

All classes that implement ServicePluginInterface

1 file declares its use of ServicePluginInterface
AnalyticsServiceManager.php in src/AnalyticsServiceManager.php

File

src/Plugin/ServicePluginInterface.php, line 13

Namespace

Drupal\analytics\Plugin
View source
interface ServicePluginInterface extends PluginInspectionInterface, DependentPluginInterface, ConfigurableInterface, PluginFormInterface {

  /**
   * Sets the current service config entity ID that is using this plugin.
   *
   * @param string $service_id
   *   The service config entity ID.
   */
  public function setServiceId($service_id);

  /**
   * Gets the current service config entity ID that is using this plugin.
   *
   * @return string
   *   The service config entity ID.
   */
  public function getServiceId();

  /**
   * Returns the label of the analytics service.
   *
   * @return string
   *   The label of this analytics service.
   */
  public function getLabel();

  /**
   * Determines if the current service can track the current request.
   *
   * @return bool
   *   TRUE if the service should output on the current page, otherwise FALSE.
   */
  public function canTrack();

  /**
   * Returns the output of the analytics service.
   *
   * @return array
   *   A structured, renderable array.
   */
  public function getOutput();

  /**
   * @return array
   */
  public function getCacheableUrls();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
PluginFormInterface::buildConfigurationForm public function Form constructor. 36
PluginFormInterface::submitConfigurationForm public function Form submission handler. 32
PluginFormInterface::validateConfigurationForm public function Form validation handler. 18
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
ServicePluginInterface::canTrack public function Determines if the current service can track the current request. 1
ServicePluginInterface::getCacheableUrls public function 1
ServicePluginInterface::getLabel public function Returns the label of the analytics service. 1
ServicePluginInterface::getOutput public function Returns the output of the analytics service. 1
ServicePluginInterface::getServiceId public function Gets the current service config entity ID that is using this plugin. 1
ServicePluginInterface::setServiceId public function Sets the current service config entity ID that is using this plugin. 1