5 * Contains \Drupal\Console\Command\Debug\ImageStylesCommand.
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\Core\Entity\EntityTypeManagerInterface;
16 * Class StylesDebugCommand
18 * @package Drupal\Console\Command\Debug
20 class ImageStylesCommand extends Command
23 * @var EntityTypeManagerInterface
25 protected $entityTypeManager;
28 * ImageStylesCommand constructor.
30 * @param EntityTypeManagerInterface $entityTypeManager
32 public function __construct(EntityTypeManagerInterface $entityTypeManager)
34 $this->entityTypeManager = $entityTypeManager;
35 parent::__construct();
41 protected function configure()
44 ->setName('debug:image:styles')
45 ->setDescription($this->trans('commands.debug.image.styles.description'))
46 ->setAliases(['dis']);
52 protected function execute(InputInterface $input, OutputInterface $output)
54 $imageStyle = $this->entityTypeManager->getStorage('image_style');
56 $this->getIo()->newLine();
57 $this->getIo()->comment(
58 $this->trans('commands.debug.image.styles.messages.styles-list')
62 $this->imageStyleList($imageStyle);
71 protected function imageStyleList($imageStyle)
74 $this->trans('commands.debug.image.styles.messages.styles-name'),
75 $this->trans('commands.debug.image.styles.messages.styles-label')
80 foreach ($imageStyle->loadMultiple() as $styles) {
87 $this->getIo()->table(