Skip to content

Instantly share code, notes, and snippets.

@splatio
Created January 26, 2014 13:18
Show Gist options
  • Save splatio/8632544 to your computer and use it in GitHub Desktop.
Save splatio/8632544 to your computer and use it in GitHub Desktop.
<?php
class HardcopyFormatPluginManager extends DefaultPluginManager {
protected $config;
public function __construct(\Traversable $namespaces, ConfigFactory $config) {
$this->config = $config;
parent::__construct('Plugin/HardcopyFormat', $namespaces, 'Drupal\hardcopy\Annotation\HardcopyFormat');
}
public function createInstance($plugin_id, array $configuration = array()) {
$configuration += (array) $this->config->get('hardcopy.format')->get($plugin_id);
return parent::createInstance($plugin_id, $configuration);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment