Skip to content

Commit

Permalink
3729 role improvements (#3745)
Browse files Browse the repository at this point in the history
[console] Role improvements. Fix #3729
  • Loading branch information
LOBsTerr authored and jmolivas committed Jan 28, 2018
1 parent dcc986f commit a8a6aa1
Show file tree
Hide file tree
Showing 41 changed files with 176 additions and 90 deletions.
2 changes: 1 addition & 1 deletion config/services/role.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ services:
- { name: drupal.command }
console.role_delete:
class: Drupal\Console\Command\Role\DeleteCommand
arguments: ['@database', '@entity_type.manager', '@date.formatter', '@console.drupal_api']
arguments: ['@database', '@entity_type.manager', '@date.formatter', '@console.drupal_api', '@console.validator']
tags:
- { name: drupal.command }
4 changes: 2 additions & 2 deletions src/Command/Generate/AjaxCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/AuthenticationProviderCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/BreakPointCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/CacheContextCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/CommandCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$services = $input->getOption('services');
$generator = $input->getOption('generator');

// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/ControllerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/EntityBundleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/EventSubscriberCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/FormAlterCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/HelpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/JsTestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/ModuleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/ModuleFileCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginBlockCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginCKEditorButtonCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginConditionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginFieldCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginFieldFormatterCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginFieldTypeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginFieldWidgetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginImageEffectCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginImageFormatterCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginMailCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginMigrateProcessCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginMigrateSourceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginRestResourceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginRulesActionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginSkeletonCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginViewsFieldCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PostUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/ProfileCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/RouteSubscriberCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/ServiceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/ThemeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/TwigExtensionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration()) {
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmOperation
if (!$this->confirmOperation()) {
return 1;
}

Expand Down
Loading

0 comments on commit a8a6aa1

Please sign in to comment.