public function PdfGeneratorPluginManager::createInstance in PDF generator API 8
Same name and namespace in other branches
- 2.x 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);
}