Skip to content

Instantly share code, notes, and snippets.

<?php
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Queue\QueueFactory;
use Drupal\Core\Queue\QueueInterface;
/**
* Implements hook_help().
*/
function article_queue_help($route_name, RouteMatchInterface $route_match) {
article_queue.article_settings_form:
path: '/admin/config/article_queue/articlesettings'
defaults:
_form: '\Drupal\article_queue\Form\ArticleSettingsForm'
_title: 'ArticleSettingsForm'
requirements:
_permission: 'access administration pages'
options:
_admin_route: TRUE
<?php
namespace Drupal\article_queue\Plugin\QueueWorker;
use Drupal\Core\Queue\QueueWorkerBase;
use Drupal\node\Entity\Node;
/**
* Processes Node Tasks.
*
langcode: en
status: true
dependencies:
module:
- article_queue
title: 'Article Queue Worker'
id: article_queue_worker
module: article_queue
callback: article_queue_article_cronjob