Skip to content

Commit

Permalink
devel:dumper re-emable (#2970)
Browse files Browse the repository at this point in the history
  • Loading branch information
enzolutions authored Nov 21, 2016
1 parent ed4e7e8 commit f79509f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
10 changes: 5 additions & 5 deletions config/services/drupal-console/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ services:
arguments: ['@event_dispatcher']
tags:
- { name: drupal.command }
# console.devel_dumper:
# class: Drupal\Console\Command\DumperCommand
# arguments: ['@app.root']
# tags:
# - { name: drupal.command }
console.devel_dumper:
class: Drupal\Console\Command\DevelDumperCommand
arguments: ['@?plugin.manager.devel_dumper']
tags:
- { name: drupal.command }
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Drupal\devel\DevelDumperManager;

/**
* Class DumperCommand.
* Class DevelDumperCommand.
* Command to quickly change between devel dumpers from the command line
*
* @package Drupal\Console\Command
Expand All @@ -23,10 +23,26 @@
* @todo Move to namespace Devel
* @todo Load devel.module legacy file
*/
class DumperCommand extends Command
class DevelDumperCommand extends Command
{
use ContainerAwareCommandTrait;

/**
* @var DevelDumperPluginManager
*/
protected $develDumperPluginManager;

/**
* DevelDumperCommand constructor.
*/
public function __construct(
DevelDumperPluginManager $develDumperPluginManager
) {
$this->develDumperPluginManager = $develDumperPluginManager;

parent::__construct();
}

/**
* {@inheritdoc}
*/
Expand Down Expand Up @@ -101,8 +117,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
protected function getDumperKeys()
{
/* @var DevelDumperPluginManager $manager */
$manager = \Drupal::service('plugin.manager.devel_dumper');
$plugins = $manager->getDefinitions();
$plugins = $this->develDumperPluginManager->getDefinitions();
return array_keys($plugins);
}
}

0 comments on commit f79509f

Please sign in to comment.