You are here

public function PartyDataManager::__construct in Party 8.2

Constructs a PartyDataManager object.

Parameters

string $type: The plugin type, for example filter.

array $namespaces: An array of paths keyed by it's corresponding namespaces.

File

lib/Drupal/party/Plugin/PartyDataManager.php, line 31
Contains \Drupal\party\Plugin\PartyDataManager.

Class

PartyDataManager
Plugin type manager for Party Data Plugins.

Namespace

Drupal\party\Plugin

Code

public function __construct(array $namespaces = array()) {
  $this->discovery = new AnnotatedClassDiscovery('party', 'PartyData', $namespaces);
  $this->discovery = new ProcessDecorator($this->discovery, array(
    $this,
    'processDefinition',
  ));
  $this->discovery = new AlterDecorator($this->discovery, 'party_data_info');
  $this->discovery = new CacheDecorator($this->discovery, 'party:party_data_info', 'cache');
  $this->factory = new ReflectionFactory($this->discovery);
  $this->defaults += array(
    'singleton' => FALSE,
    'view mode' => 'party',
  );
}