class DeleteOrphan in Organic groups 8
Deletes orphaned group content.
Plugin annotation
@QueueWorker(
id = "og_orphaned_group_content_cron",
title = @Translation("Delete orphaned group content"),
cron = {"time" = 60}
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Queue\QueueWorkerBase implements QueueWorkerInterface
- class \Drupal\og\Plugin\QueueWorker\DeleteOrphan implements ContainerFactoryPluginInterface
- class \Drupal\Core\Queue\QueueWorkerBase implements QueueWorkerInterface
Expanded class hierarchy of DeleteOrphan
File
- src/
Plugin/ QueueWorker/ DeleteOrphan.php, line 21
Namespace
Drupal\og\Plugin\QueueWorkerView source
class DeleteOrphan extends QueueWorkerBase implements ContainerFactoryPluginInterface {
/**
* The plugin manager for OgDeleteOrphans plugins.
*
* @var \Drupal\og\OgDeleteOrphansPluginManager
*/
protected $ogDeleteOrphansPluginManager;
/**
* Constructs a DeleteOrphan object.
*
* @param array $configuration
* A configuration array containing information about the plugin instance.
* @param string $plugin_id
* The plugin_id for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
* @param \Drupal\og\OgDeleteOrphansPluginManager $og_delete_orphans_plugin_manager
* The plugin manager for OgDeleteOrphans plugins.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, OgDeleteOrphansPluginManager $og_delete_orphans_plugin_manager) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->ogDeleteOrphansPluginManager = $og_delete_orphans_plugin_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('plugin.manager.og.delete_orphans'));
}
/**
* {@inheritdoc}
*/
public function processItem($data) {
$this->ogDeleteOrphansPluginManager
->createInstance('cron', [])
->processItem($data);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeleteOrphan:: |
protected | property | The plugin manager for OgDeleteOrphans plugins. | |
DeleteOrphan:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
DeleteOrphan:: |
public | function |
Works on a single queue item. Overrides QueueWorkerInterface:: |
|
DeleteOrphan:: |
public | function |
Constructs a DeleteOrphan 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. |