You are here

FormatterPluginManager.php in Geocoder 8.2

Same filename and directory in other branches
  1. 8.3 src/FormatterPluginManager.php

Namespace

Drupal\geocoder

File

src/FormatterPluginManager.php
View source
<?php

namespace Drupal\geocoder;

use Drupal\geocoder\Plugin\Geocoder\Formatter\FormatterInterface;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\geocoder\Annotation\GeocoderFormatter;

/**
 * Provides a plugin manager for geocoder formatters.
 */
class FormatterPluginManager extends GeocoderPluginManagerBase {

  /**
   * {@inheritdoc}
   */
  public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
    parent::__construct('Plugin/Geocoder/Formatter', $namespaces, $module_handler, FormatterInterface::class, GeocoderFormatter::class);
    $this
      ->alterInfo('geocoder_formatter_info');
    $this
      ->setCacheBackend($cache_backend, 'geocoder_formatter_plugins');
  }

}

Classes

Namesort descending Description
FormatterPluginManager Provides a plugin manager for geocoder formatters.