public function PdfGeneratorPluginManager::createInstance in PDF generator API 2.x
Same name and namespace in other branches
- 8 src/PdfGeneratorPluginManager.php \Drupal\pdf_api\PdfGeneratorPluginManager::createInstance()
Creates a pre-configured instance of a plugin.
Parameters
string $plugin_id: The ID of the plugin being instantiated.
array $configuration: An array of configuration relevant to the plugin instance.
Return value
object A fully configured plugin instance.
Throws
\Drupal\Component\Plugin\Exception\PluginException If the instance cannot be created, such as if the ID is invalid.
Overrides PluginManagerBase::createInstance
File
- src/
PdfGeneratorPluginManager.php, line 45 - Contains \Drupal\pdf_generator\PdfGeneratorPluginManager.
Class
- PdfGeneratorPluginManager
- Manages PDF generator plugins.
Namespace
Drupal\pdf_apiCode
public function createInstance($plugin_id, array $configuration = array()) {
$configuration += (array) $this->config
->get('printable.format')
->get($plugin_id);
return parent::createInstance($plugin_id, $configuration);
}