abstract class GoogleAnalyticsCounterQueueBase in Google Analytics Counter 8.3
Provides base functionality for Google Analytics Counter workers.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Queue\QueueWorkerBase implements QueueWorkerInterface
- class \Drupal\google_analytics_counter\Plugin\QueueWorker\GoogleAnalyticsCounterQueueBase implements ContainerFactoryPluginInterface
- class \Drupal\Core\Queue\QueueWorkerBase implements QueueWorkerInterface
Expanded class hierarchy of GoogleAnalyticsCounterQueueBase
See also
See https://www.drupal.org/forum/support/module-development-and-code-questio...
https://drupal.stackexchange.com/questions/206838/documentation-or-tutor...
File
- src/
Plugin/ QueueWorker/ GoogleAnalyticsCounterQueueBase.php, line 15
Namespace
Drupal\google_analytics_counter\Plugin\QueueWorkerView source
abstract class GoogleAnalyticsCounterQueueBase extends QueueWorkerBase implements ContainerFactoryPluginInterface {
// Here we don't use the Dependency Injection,
// but the __construct() and create() methods are necessary.
/**
* {@inheritdoc}
*/
public function __construct() {
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static();
}
/**
* {@inheritdoc}
*/
public function processItem($data) {
if ($data['type'] == 'fetch') {
\Drupal::service('google_analytics_counter.app_manager')
->gacUpdatePathCounts($data['index']);
}
elseif ($data['type'] == 'count') {
\Drupal::service('google_analytics_counter.app_manager')
->gacUpdateStorage($data['nid'], $data['bundle'], $data['vid']);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GoogleAnalyticsCounterQueueBase:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
GoogleAnalyticsCounterQueueBase:: |
public | function |
Works on a single queue item. Overrides QueueWorkerInterface:: |
|
GoogleAnalyticsCounterQueueBase:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. |