Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields | Protected Member Functions
TemplateHintsDisableCommand Class Reference
Inheritance diagram for TemplateHintsDisableCommand:

Public Member Functions

 __construct (ConfigInterface $resourceConfig)
 

Data Fields

const COMMAND_NAME = 'dev:template-hints:disable'
 
const SUCCESS_MESSAGE = "Template hints disabled. Refresh cache types"
 

Protected Member Functions

 configure ()
 
 execute (InputInterface $input, OutputInterface $output)
 

Detailed Description

Definition at line 14 of file TemplateHintsDisableCommand.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ConfigInterface  $resourceConfig)

Initialize dependencies.

Parameters
ConfigInterface$resourceConfig

Definition at line 36 of file TemplateHintsDisableCommand.php.

37  {
38  parent::__construct();
39  $this->resourceConfig = $resourceConfig;
40  }

Member Function Documentation

◆ configure()

configure ( )
protected

{}

Definition at line 45 of file TemplateHintsDisableCommand.php.

46  {
47  $this->setName(self::COMMAND_NAME)
48  ->setDescription('Disable frontend template hints. A cache flush might be required.');
49 
50  parent::configure();
51  }

◆ execute()

execute ( InputInterface  $input,
OutputInterface  $output 
)
protected

{}

Exceptions

Definition at line 57 of file TemplateHintsDisableCommand.php.

58  {
59  $this->resourceConfig->saveConfig('dev/debug/template_hints_storefront', 0, 'default', 0);
60  $output->writeln("<info>". self::SUCCESS_MESSAGE . "</info>");
61  }

Field Documentation

◆ COMMAND_NAME

const COMMAND_NAME = 'dev:template-hints:disable'

command name

Definition at line 19 of file TemplateHintsDisableCommand.php.

◆ SUCCESS_MESSAGE

const SUCCESS_MESSAGE = "Template hints disabled. Refresh cache types"

Success message

Definition at line 24 of file TemplateHintsDisableCommand.php.


The documentation for this class was generated from the following file: