public function PrintableFormatPluginManager::createInstance in Printer and PDF versions for Drupal 8+ 2.x
Same name and namespace in other branches
- 8 src/PrintableFormatPluginManager.php \Drupal\printable\PrintableFormatPluginManager::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/
PrintableFormatPluginManager.php, line 40
Class
- PrintableFormatPluginManager
- Manages printable format plugins.
Namespace
Drupal\printableCode
public function createInstance($plugin_id, array $configuration = []) {
$configuration += (array) $this->config
->get('printable.format')
->get($plugin_id);
return parent::createInstance($plugin_id, $configuration);
}