You are here

protected function DevelDumperManager::createInstance in Devel 4.x

Same name and namespace in other branches
  1. 8.3 src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::createInstance()
  2. 8 src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::createInstance()
  3. 8.2 src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::createInstance()

Instances a new dumper plugin.

Parameters

string $plugin_id: (optional) The plugin ID, defaults to NULL.

Return value

\Drupal\devel\DevelDumperInterface Returns the devel dumper plugin instance.

1 call to DevelDumperManager::createInstance()
DevelDumperManager::dumpOrExport in src/DevelDumperManager.php
Wrapper for ::dump() and ::export().

File

src/DevelDumperManager.php, line 65

Class

DevelDumperManager
Class DevelDumperManager.

Namespace

Drupal\devel

Code

protected function createInstance($plugin_id = NULL) {
  if (!$plugin_id || !$this->dumperManager
    ->isPluginSupported($plugin_id)) {
    $plugin_id = $this->config
      ->get('devel_dumper');
  }
  return $this->dumperManager
    ->createInstance($plugin_id);
}