function DevelDumperManager::dumpOrExport

Same name in other branches
  1. 4.x src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::dumpOrExport()

Overrides DevelDumperManagerInterface::dumpOrExport

File

src/DevelDumperManager.php, line 154

Class

DevelDumperManager
Manager class for DevelDumper.

Namespace

Drupal\devel

Code

public function dumpOrExport($input, $name = NULL, $export = TRUE, $plugin_id = NULL) {
    if ($this->hasAccessToDevelInformation()) {
        $dumper = $this->createInstance($plugin_id);
        if ($export) {
            return $dumper->export($input, $name);
        }
        $dumper->dump($input, $name);
    }
    return NULL;
}