ProcessorPluginManager.php in Facets 8
File
modules/facets_summary/src/Processor/ProcessorPluginManager.php
View source
<?php
namespace Drupal\facets_summary\Processor;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
use Drupal\facets_summary\Annotation\SummaryProcessor;
class ProcessorPluginManager extends DefaultPluginManager {
use StringTranslationTrait;
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, TranslationInterface $translation) {
parent::__construct('Plugin/facets_summary/processor', $namespaces, $module_handler, ProcessorInterface::class, SummaryProcessor::class);
$this
->setCacheBackend($cache_backend, 'facets_summary_processors');
$this
->setStringTranslation($translation);
}
public function getProcessingStages() {
return [
ProcessorInterface::STAGE_BUILD => [
'label' => $this
->t('Build stage'),
],
];
}
}