public function FormatterPluginManager::__construct

Constructs a FormatterPluginManager object.

File

drupal/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php, line 33
Definition of Drupal\field\Plugin\Type\Formatter\FormatterPluginManager..

Class

FormatterPluginManager
Plugin type manager for field formatters.

Namespace

Drupal\field\Plugin\Type\Formatter

Code

public function __construct() {
  $this->discovery = new AnnotatedClassDiscovery('field', 'formatter');
  $this->discovery = new FormatterLegacyDiscoveryDecorator($this->discovery);
  $this->discovery = new ProcessDecorator($this->discovery, array(
    $this,
    'processDefinition',
  ));
  $this->discovery = new AlterDecorator($this->discovery, 'field_formatter_info');
  $this->discovery = new CacheDecorator($this->discovery, 'field_formatter_types', 'field');
  $this->factory = new FormatterFactory($this);
}