5 * Contains \Drupal\Console\Command\Debug\CacheContextCommand.
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\ContainerAwareCommand;
15 * Class CacheContextCommand.
17 * @package Drupal\Console\Command\Debug
19 class CacheContextCommand extends ContainerAwareCommand
24 protected function configure()
27 ->setName('debug:cache:context')
28 ->setDescription($this->trans('commands.debug.cache.context.description'))
29 ->setAliases(['dcc']);
35 protected function execute(InputInterface $input, OutputInterface $output)
37 $contextManager = $this->get('cache_contexts_manager');
40 $this->trans('commands.debug.cache.context.messages.code'),
41 $this->trans('commands.debug.cache.context.messages.label'),
42 $this->trans('commands.debug.cache.context.messages.class'),
47 foreach ($contextManager->getAll() as $code) {
48 $context = $this->get('cache_context.'.$code);
51 $context->getLabel()->render(),
56 $this->getIo()->table($tableHeader, $tableRows, 'compact');