5 * Contains \Drupal\Console\Command\Image\StylesDebugCommand.
8 namespace Drupal\Console\Command\Image;
10 use Symfony\Component\Console\Input\InputInterface;
11 use Symfony\Component\Console\Output\OutputInterface;
12 use Symfony\Component\Console\Command\Command;
13 use Drupal\Core\Entity\EntityTypeManagerInterface;
14 use Drupal\Console\Core\Command\Shared\CommandTrait;
15 use Drupal\Console\Core\Style\DrupalStyle;
18 * Class StylesDebugCommand
20 * @package Drupal\Console\Command\Image
22 class StylesDebugCommand extends Command
27 * @var EntityTypeManagerInterface
29 protected $entityTypeManager;
32 * StylesDebugCommand constructor.
34 * @param EntityTypeManagerInterface $entityTypeManager
36 public function __construct(EntityTypeManagerInterface $entityTypeManager)
38 $this->entityTypeManager = $entityTypeManager;
39 parent::__construct();
45 protected function configure()
48 ->setName('image:styles:debug')
49 ->setDescription($this->trans('commands.image.styles.debug.description'));
55 protected function execute(InputInterface $input, OutputInterface $output)
57 $io = new DrupalStyle($input, $output);
59 $imageStyle = $this->entityTypeManager->getStorage('image_style');
63 $this->trans('commands.image.styles.debug.messages.styles-list')
67 $this->imageStyleList($io, $imageStyle);
74 * @param \Drupal\Console\Core\Style\DrupalStyle $io
77 protected function imageStyleList(DrupalStyle $io, $imageStyle)
80 $this->trans('commands.image.styles.debug.messages.styles-name'),
81 $this->trans('commands.image.styles.debug.messages.styles-label')
86 foreach ($imageStyle->loadMultiple() as $styles) {