5 * Contains \Drupal\Console\Command\Roles\DebugCommand.
8 namespace Drupal\Console\Command\Debug;
10 use Symfony\Component\Console\Input\InputInterface;
11 use Symfony\Component\Console\Output\OutputInterface;
12 use Drupal\Console\Core\Command\Command;
13 use Drupal\Console\Utils\DrupalApi;
18 * @package Drupal\Console\Command\Debug
20 class RolesCommand extends Command
28 * DebugCommand constructor.
30 * @param DrupalApi $drupalApi
32 public function __construct(
35 $this->drupalApi = $drupalApi;
36 parent::__construct();
42 protected function configure()
45 ->setName('debug:roles')
46 ->setDescription($this->trans('commands.debug.roles.description'))
47 ->setAliases(['dusr']);
53 protected function execute(InputInterface $input, OutputInterface $output)
55 $roles = $this->drupalApi->getRoles();
58 $this->trans('commands.debug.roles.messages.role-id'),
59 $this->trans('commands.debug.roles.messages.role-name'),
63 foreach ($roles as $roleId => $role) {
70 $this->getIo()->table($tableHeader, $tableRows);