class CronQueueTestDeriver
Same name in other branches
- 10 core/modules/system/tests/modules/cron_queue_test/src/Plugin/Derivative/CronQueueTestDeriver.php \Drupal\cron_queue_test\Plugin\Derivative\CronQueueTestDeriver
Provides a deriver for testing cron queues.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements \Drupal\Component\Plugin\Derivative\DeriverInterface
- class \Drupal\cron_queue_test\Plugin\Derivative\CronQueueTestDeriver extends \Drupal\Component\Plugin\Derivative\DeriverBase
Expanded class hierarchy of CronQueueTestDeriver
1 file declares its use of CronQueueTestDeriver
- CronQueueTestDeriverQueue.php in core/
modules/ system/ tests/ modules/ cron_queue_test/ src/ Plugin/ QueueWorker/ CronQueueTestDeriverQueue.php
File
-
core/
modules/ system/ tests/ modules/ cron_queue_test/ src/ Plugin/ Derivative/ CronQueueTestDeriver.php, line 12
Namespace
Drupal\cron_queue_test\Plugin\DerivativeView source
class CronQueueTestDeriver extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
$example_data = [
'foo' => 'Foo',
'bar' => 'Bar',
];
$derivatives = [];
foreach ($example_data as $key => $label) {
$derivatives[$key] = [
'title' => strtr('Cron queue test: @label', [
'@label' => $label,
]),
] + $base_plugin_definition;
}
return $derivatives;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
CronQueueTestDeriver::getDerivativeDefinitions | public | function | Gets the definition of all derivatives of a base plugin. | Overrides DeriverBase::getDerivativeDefinitions | |
DeriverBase::$derivatives | protected | property | List of derivative definitions. | 1 | |
DeriverBase::getDerivativeDefinition | public | function | Gets the definition of a derivative plugin. | Overrides DeriverInterface::getDerivativeDefinition |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.