diff --git a/core/core.services.yml b/core/core.services.yml index 8029029..2f6d90f 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -176,7 +176,7 @@ services: class: Drupal\Core\Menu\LocalTaskManager arguments: ['@container.namespaces', '@controller_resolver', '@request', '@router.route_provider', '@module_handler'] plugin.manager.queue.item: - class: Drupal\Core\Queue\QueueItemManager + class: Drupal\Core\Queue\QueuePluginManager arguments: ['@container.namespaces', '@module_handler'] request: class: Symfony\Component\HttpFoundation\Request diff --git a/core/lib/Drupal/Core/Annotation/QueueItem.php b/core/lib/Drupal/Core/Annotation/QueuePlugin.php similarity index 88% rename from core/lib/Drupal/Core/Annotation/QueueItem.php rename to core/lib/Drupal/Core/Annotation/QueuePlugin.php index d45e5e0..c30bf2d 100644 --- a/core/lib/Drupal/Core/Annotation/QueueItem.php +++ b/core/lib/Drupal/Core/Annotation/QueuePlugin.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Annotation\QueueItem. + * Contains \Drupal\Core\Annotation\QueuePlugin. */ namespace Drupal\Core\Annotation; @@ -25,12 +25,12 @@ * * @see hook_cron() * @see hook_queue_info_alter() - * @see \Drupal\Core\QueueItem\QueueItemInterface - * @see \Drupal\Core\QueueItem\QueueItemManager + * @see \Drupal\Core\Queue\QueuePluginInterface + * @see \Drupal\Core\Queue\QueuePluginManager * * @Annotation */ -class QueueItem extends Plugin { +class QueuePlugin extends Plugin { /** * The plugin ID. diff --git a/core/lib/Drupal/Core/Queue/QueueItemBase.php b/core/lib/Drupal/Core/Queue/QueueItemBase.php deleted file mode 100644 index 031021b..0000000 --- a/core/lib/Drupal/Core/Queue/QueueItemBase.php +++ /dev/null @@ -1,17 +0,0 @@ -alterInfo($module_handler, 'queue_info'); } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/QueueItem/AggregatorRefresh.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/QueuePlugin/AggregatorRefresh.php similarity index 58% rename from core/modules/aggregator/lib/Drupal/aggregator/Plugin/QueueItem/AggregatorRefresh.php rename to core/modules/aggregator/lib/Drupal/aggregator/Plugin/QueuePlugin/AggregatorRefresh.php index 47bc642..3523ef9 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/QueueItem/AggregatorRefresh.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/QueuePlugin/AggregatorRefresh.php @@ -2,23 +2,23 @@ /** * @file - * Contains \Drupal\aggregator\Plugin\QueueItem\AggregatorRefresh. + * Contains \Drupal\aggregator\Plugin\QueuePlugin\AggregatorRefresh. */ -namespace Drupal\aggregator\Plugin\QueueItem; +namespace Drupal\aggregator\Plugin\QueuePlugin; -use Drupal\Core\Annotation\QueueItem; +use Drupal\Core\Annotation\QueuePlugin; use Drupal\Core\Annotation\Translation; -use Drupal\Core\Queue\QueueItemBase; +use Drupal\Core\Queue\QueuePluginBase; /** - * @QueueItem( + * @QueuePlugin( * id = "aggregator_feeds", * title = @Translation("Aggregator refresh"), * cron = {"time" = 60} * ) */ -class AggregatorRefresh extends QueueItemBase { +class AggregatorRefresh extends QueuePluginBase { /** * {@inheritdoc} diff --git a/core/modules/locale/lib/Drupal/locale/Plugin/QueueItem/LocaleTranslation.php b/core/modules/locale/lib/Drupal/locale/Plugin/QueuePlugin/LocaleTranslation.php similarity index 92% rename from core/modules/locale/lib/Drupal/locale/Plugin/QueueItem/LocaleTranslation.php rename to core/modules/locale/lib/Drupal/locale/Plugin/QueuePlugin/LocaleTranslation.php index 322dd03..0a52ece 100644 --- a/core/modules/locale/lib/Drupal/locale/Plugin/QueueItem/LocaleTranslation.php +++ b/core/modules/locale/lib/Drupal/locale/Plugin/QueuePlugin/LocaleTranslation.php @@ -2,27 +2,27 @@ /** * @file - * Contains \Drupal\locale\Plugin\QueueItem\LocaleTranslation. + * Contains \Drupal\locale\Plugin\QueuePlugin\LocaleTranslation. */ -namespace Drupal\locale\Plugin\QueueItem; +namespace Drupal\locale\Plugin\QueuePlugin; -use Drupal\Core\Annotation\QueueItem; +use Drupal\Core\Annotation\QueuePlugin; use Drupal\Core\Annotation\Translation; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Queue\QueueInterface; -use Drupal\Core\Queue\QueueItemBase; +use Drupal\Core\Queue\QueuePluginBase; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * @QueueItem( + * @QueuePlugin( * id = "locale_translation", * title = @Translation("Update translations"), * cron = {"time" = 30} * ) */ -class LocaleTranslation extends QueueItemBase implements ContainerFactoryPluginInterface { +class LocaleTranslation extends QueuePluginBase implements ContainerFactoryPluginInterface { /** * The module handler. diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 391d0e1..ad82882 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -430,7 +430,7 @@ function locale_themes_disabled($themes) { * Implements hook_cron(). * * @see drupal_cron_run() - * @see \Drupal\locale\Plugin\QueueItem\LocaleTranslation + * @see \Drupal\locale\Plugin\QueuePlugin\LocaleTranslation */ function locale_cron() { // Update translations only when an update frequency was set by the admin diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 47c6b82..8fa6434 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -107,7 +107,7 @@ function hook_admin_paths_alter(&$paths) { * Long-running tasks and tasks that could time out, such as retrieving remote * data, sending email, and intensive file tasks, should use the queue API * instead of executing the tasks directly. To do this, first define one or - * more queues via a \Drupal\Core\Annotation\QueueItem plugin. Then, add items + * more queues via a \Drupal\Core\Annotation\QueuePlugin plugin. Then, add items * that need to be processed to the defined queues. */ function hook_cron() { @@ -152,8 +152,8 @@ function hook_data_type_info_alter(&$data_types) { * @param array $queues * An array of cron queue information. * - * @see \Drupal\Core\QueueItem\QueueItemInterface - * @see \Drupal\Core\Annotation\QueueItem + * @see \Drupal\Core\QueuePlugin\QueuePluginInterface + * @see \Drupal\Core\Annotation\QueuePlugin * @see drupal_cron_run() */ function hook_queue_info_alter(&$queues) {