EntityQueueHandlerManager.php in Entityqueue 8
File
src/EntityQueueHandlerManager.php
View source
<?php
namespace Drupal\entityqueue;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
class EntityQueueHandlerManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/EntityQueueHandler', $namespaces, $module_handler, NULL, 'Drupal\\entityqueue\\Annotation\\EntityQueueHandler');
$this
->setCacheBackend($cache_backend, 'entityqueuehandler');
}
public function getAllEntityQueueHandlers() {
$handlers = [];
foreach ($this
->getDefinitions() as $plugin_id => $plugin_def) {
$handlers[$plugin_id] = $plugin_def['title'];
}
asort($handlers);
return $handlers;
}
}