Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
setup
src
Magento
Setup
Console
Command
MaintenanceStatusCommand.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Setup\Console\Command
;
8
9
use
Magento\Framework\App\MaintenanceMode
;
10
use
Magento\Framework\Module\ModuleList
;
11
use Symfony\Component\Console\Input\InputInterface;
12
use Symfony\Component\Console\Output\OutputInterface;
13
17
class
MaintenanceStatusCommand
extends
AbstractSetupCommand
18
{
22
private
$maintenanceMode;
23
29
public
function
__construct
(
MaintenanceMode
$maintenanceMode)
30
{
31
$this->maintenanceMode = $maintenanceMode;
32
parent::__construct();
33
}
34
40
protected
function
configure
()
41
{
42
$this->setName(
'maintenance:status'
)
43
->setDescription(
'Displays maintenance mode status'
);
44
parent::configure();
45
}
46
50
protected
function
execute
(InputInterface $input, OutputInterface
$output
)
51
{
52
$output
->writeln(
53
'<info>Status: maintenance mode is '
.
54
($this->maintenanceMode->isOn() ?
'active'
:
'not active'
) .
'</info>'
55
);
56
$addressInfo = $this->maintenanceMode->getAddressInfo();
57
$addresses
= implode(
' '
, $addressInfo);
58
$output
->writeln(
'<info>List of exempt IP-addresses: '
. (
$addresses
?
$addresses
:
'none'
) .
'</info>'
);
59
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
60
}
61
}
Magento\Setup\Console\Command\AbstractSetupCommand
Definition:
AbstractSetupCommand.php:16
Magento\Setup\Console\Command\MaintenanceStatusCommand\configure
configure()
Definition:
MaintenanceStatusCommand.php:40
$addresses
$addresses
Definition:
address_list.php:7
Magento\Setup\Console\Command\MaintenanceStatusCommand\__construct
__construct(MaintenanceMode $maintenanceMode)
Definition:
MaintenanceStatusCommand.php:29
Magento\Framework\App\MaintenanceMode
Definition:
MaintenanceMode.php:14
Magento\Setup\Console\Command\MaintenanceStatusCommand
Definition:
MaintenanceStatusCommand.php:17
Magento\Setup\Console\Command
Definition:
DependenciesShowFrameworkCommandTest.php:6
$output
$output
Definition:
classmap_generator.php:100
Magento\Setup\Console\Command\MaintenanceStatusCommand\execute
execute(InputInterface $input, OutputInterface $output)
Definition:
MaintenanceStatusCommand.php:50
Magento\Framework\Module\ModuleList
Definition:
Loader.php:7