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
framework
Translate
Inline
State.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Translate\Inline
;
8
9
class
State
implements
StateInterface
10
{
16
protected
$isEnabled
=
true
;
17
21
protected
$storedStatus
;
22
28
public
function
disable
()
29
{
30
$this->
isEnabled
=
false
;
31
}
32
38
public
function
enable
()
39
{
40
$this->
isEnabled
=
true
;
41
}
42
48
public
function
isEnabled
()
49
{
50
return
$this->isEnabled
;
51
}
52
62
public
function
suspend
(
$status
=
false
)
63
{
64
if
($this->storedStatus ===
null
) {
65
$this->storedStatus =
$this->isEnabled
;
66
$this->
isEnabled
=
$status
;
67
}
68
}
69
79
public
function
resume
(
$status
=
true
)
80
{
81
$this->
isEnabled
= !
$status
?
$status
:
$this->storedStatus
;
82
$this->storedStatus =
null
;
83
}
84
}
Magento\Framework\Translate\Inline\State\$isEnabled
$isEnabled
Definition:
State.php:16
Magento\Framework\Translate\Inline
Definition:
ConfigInterface.php:6
Magento\Framework\Translate\Inline\State\suspend
suspend($status=false)
Definition:
State.php:62
Magento\Framework\Translate\Inline\State\isEnabled
isEnabled()
Definition:
State.php:48
Magento\Framework\Translate\Inline\StateInterface
Definition:
StateInterface.php:15
Magento\Framework\Translate\Inline\State\enable
enable()
Definition:
State.php:38
Magento\Framework\Translate\Inline\State\$storedStatus
$storedStatus
Definition:
State.php:21
Magento\Framework\Translate\Inline\State\disable
disable()
Definition:
State.php:28
$status
$status
Definition:
order_status.php:8
Magento\Framework\Translate\Inline\State\resume
resume($status=true)
Definition:
State.php:79
Magento\Framework\Translate\Inline\State
Definition:
State.php:9