function DumperTrait::dumper
Gets the dumper service.
Return value
\Drupal\devel\DevelDumperManagerInterface|bool The dumper service or FALSE if the service is not available.
File
-
modules/
file_example/ src/ Traits/ DumperTrait.php, line 16
Class
- DumperTrait
- Provides a trait for dumper service.
Namespace
Drupal\file_example\TraitsCode
protected function dumper() {
if (\Drupal::hasService('devel.dumper')) {
/** @var \Drupal\devel\DevelDumperManagerInterface $dumper */
$dumper = \Drupal::service('devel.dumper');
return $dumper;
}
return FALSE;
}